LcdDisplay.CharacterLcd (lcd_display v0.3.0)

View Source

High-level API for character-based LCD modules (HD44780 compatible).

This module starts a display controller process using a given HD44780 driver and provides a simple API to execute commands on the display.

Summary

Functions

Returns a specification to start this module under a supervisor.

Executes a supported command.

Starts a display controller process for a specified.

Types

config()

@type config() :: %{:driver_module => atom(), required(atom()) => any()}

display_command()

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

display_driver()

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

Functions

child_spec(arg)

@spec child_spec(list()) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

execute(server, command)

@spec execute(GenServer.server(), display_command()) ::
  {:ok, display_driver()} | {:error, any()}

Executes a supported command.

start_link(config, opts \\ [])

@spec start_link(config(), GenServer.options()) :: {:ok, pid()} | {:error, any()}

Starts a display controller process for a specified.