View Source Fledex.LedStripDriver.Driver behaviour (fledex v0.1.1)

Summary

Types

@type colorint() :: 0..16_777_215
@type hsv() :: {hue :: 0..255, saturation :: 0..255, value :: 0..255}
@type rgb() :: {red :: 0..255, green :: 0..255, blue :: 0..255}

Callbacks

@callback init(module_init_args :: map()) :: map()
Link to this callback

terminate(reason, config)

View Source
@callback terminate(reason, config :: map()) :: :ok
when reason: :normal | :shutdown | {:shutdown, term()} | term()
Link to this callback

transfer(leds, counter, config)

View Source
@callback transfer(leds :: [colorint()], counter :: pos_integer(), config :: map()) ::
  map()

Functions

@spec init(map(), Fledex.LedDriver.t()) :: Fledex.LedDriver.t()
Link to this function

terminate(reason, state)

View Source
@spec transfer([colorint()], Fledex.LedDriver.t()) :: Fledex.LedDriver.t()