LcdDisplay.DisplayDriver behaviour (LcdDisplay v0.0.9) View Source
Defines a behaviour required for an LCD driver.
Link to this section Summary
Types
Type that represents a supported display command.
Type that represents the display state.
Type that represents an available display feature.
Callbacks
Executes the specified command and returns a new display state.
Initializes the LCD driver and returns the initial display state.
Stops the LCD driver.
Link to this section Types
Specs
command() :: :clear | :home | {:print, String.t()} | {:write, charlist()} | {:set_cursor, integer(), integer()} | {:cursor, boolean()} | {:blink, boolean()} | {:display, boolean()} | {:autoscroll, boolean()} | {:backlight, boolean()} | :entry_right_to_left | :entry_left_to_right | {:scroll, integer()} | {:left, integer()} | {:right, integer()} | {:char, integer(), byte()}
Type that represents a supported display command.
Supported Command | Description |
---|---|
:clear | Clear the display. |
:home | Move the cursor home. |
:print | Print a text at the current cursor. |
:write | write a character (byte) at the current cursor. |
:set_cursor | Move the cursor to the specified position (column and row). |
:cursor | Switch on/off the underline cursor. |
:display | Switch on/off the display. |
:blink | Switch on/off the block cursor. |
:autoscroll | Automatically scroll the display when a charactor is written. |
:backlight | Switch on/off the backlight. |
:entry_right_to_left | Text is printed from right to left. |
:entry_left_to_right | Text is printed from left to right. |
:scroll | Scroll left/right the display. |
:left | Move the cursor left. |
:right | Move the cursor right. |
:char | Program custom character to CGRAM. |
Specs
display() :: %{ driver_module: atom(), name: String.t(), rows: integer(), cols: integer(), entry_mode: integer(), display_control: integer(), backlight: boolean() }
Type that represents the display state.
Specs
feature() :: :entry_mode | :display_control
Type that represents an available display feature.
Link to this section Callbacks
Specs
Executes the specified command and returns a new display state.
Specs
Initializes the LCD driver and returns the initial display state.
Specs
stop(display()) :: :ok
Stops the LCD driver.