LcdDisplay.DisplayController (lcd_display v0.3.0)

View Source

Wraps a given display driver and controls the display using that driver.

Summary

Functions

Returns a specification to start this module under a supervisor.

Delegates the specified operation to the display driver, and updates the state as needed.

Starts a display driver process and registers the process with a composite key of driver module and display name.

Types

display_command()

@type display_command() :: LcdDisplay.HD44780.Driver.command()

display_driver()

@type display_driver() :: LcdDisplay.HD44780.Driver.t()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

execute(pid, command)

Delegates the specified operation to the display driver, and updates the state as needed.

Examples

DisplayController.execute(pid, {:print, "Hello"})

start_link(display_driver, opts \\ [])

@spec start_link(
  display_driver(),
  keyword()
) :: {:ok, pid()} | {:error, any()}

Starts a display driver process and registers the process with a composite key of driver module and display name.