ex_lcd v0.3.0 ExLCD.Driver behaviour
ExLCD.Driver defines the behaviour expected of display driver modules. Each display driver module must use this module and implement the expected callback functions.
defmodule MyDisplayDriver do
use ExLCD.Driver
...
end
Summary
Callbacks
execute/0 is called by ExLCD to learn the function it should call to send commands to your driver. The typespec of the function returned must be: function(display, operation) :: display The returned function will be called upon to do all of the heavy lifting
start/1 is called during initialization of ExLCD which passes a map of configuration parameters for the driver. The driver is_ expected to initialize the display to a ready state and return state data held by and passed into the driver on each call. ExLCD manages your driver’s state. After this callback returns it is expected that the display is ready to process commands from ExLCD
stop/1 may be called on request by the application to free the hardware resources held by the display driver
Types
Callbacks
execute/0 is called by ExLCD to learn the function it should call to send commands to your driver. The typespec of the function returned must be: function(display, operation) :: display The returned function will be called upon to do all of the heavy lifting.
start/1 is called during initialization of ExLCD which passes a map of configuration parameters for the driver. The driver is_ expected to initialize the display to a ready state and return state data held by and passed into the driver on each call. ExLCD manages your driver’s state. After this callback returns it is expected that the display is ready to process commands from ExLCD.
stop/1 may be called on request by the application to free the hardware resources held by the display driver.