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

Summary

Callbacks

@callback init(module_init_args :: map()) :: map()
@callback reinit(module_config :: 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 :: [Fledex.Color.Types.colorint()],
  counter :: pos_integer(),
  config :: map()
) ::
  {map(), response :: any()}

Functions

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

terminate(reason, state)

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