Trait lcd::Hardware [−][src]
Required methods
fn rs(&mut self, bit: bool)
[src]
fn enable(&mut self, bit: bool)
[src]
fn data(&mut self, data: u8)
[src]
Provided methods
fn wait_address(&mut self)
[src]
Address set up time is 40ns minimum (tAS) This function should be overridden in case processor is too fast for 40ns to pass.
fn mode(&self) -> FunctionMode
[src]
Override to pick 8-bit mode (4-bit mode by default)
fn can_read(&self) -> bool
[src]
If this implementation can read from the data port. Default is false
. If true
is
returned, both set_read
and read_data
need to be implemented.
fn rw(&mut self, _bit: bool)
[src]
Set R/W flag.
Implementation should re-configure GPIO for input before setting R/W pin to true
and configure GPIO for output after setting R/W to false
.
Note that LCD driver typically uses 5V, so input should be tolerant to 5V when using busy flag.
Default implementation will panic.
fn read_data(&mut self) -> u8
[src]
Read data from the data pins of the LCD (D0-D7 in 8-bit mode and D4-D7 in 4-bit mode)
Default implementation will panic.
fn apply(&mut self)
[src]
Send data to the device.
This is mainly for LCDs attached via I2C / SMBUS where it's important to make changes to data and control lines at the same time.
If control and data lines are directly attached, there's no need to implement this method.