Packages

OLED is a library to manage the monochrome OLED screen based on chip SSD1306. Implements a Scenic driver but also set of graphic primitves to work standalone.

Current section

Files

Jump to
oled lib oled display config_helper.ex
Raw

lib/oled/display/config_helper.ex

defmodule OLED.Display.Helper do
@moduledoc false
def validate_config(required, config) do
Enum.reduce_while(required, nil, fn key, _ ->
if Keyword.has_key?(config, key) do
{:cont, :ok}
else
{:error, {:missed_config, key}}
end
end)
end
end