pub struct Display<P, U>{ /* private fields */ }Expand description
A HD44780 compliant display.
It provides a high-level and hardware agnostic interface to controll a HD44780 compliant liquid crystal display (LCD).
Implementations§
Source§impl<P, U> Display<P, U>
impl<P, U> Display<P, U>
pub fn init(&self, builder: &FunctionSetBuilder)
Sourcepub fn set_entry_mode(&self, builder: &EntryModeBuilder)
pub fn set_entry_mode(&self, builder: &EntryModeBuilder)
Sets the entry mode of the display.
Sourcepub fn set_display_control(&self, builder: &DisplayControlBuilder)
pub fn set_display_control(&self, builder: &DisplayControlBuilder)
Sets the display control settings.
Sourcepub fn shift_cursor(&mut self, direction: ShiftTo)
pub fn shift_cursor(&mut self, direction: ShiftTo)
Shifts the cursor to the left or the right by the given offset.
Note: Consider to use seek() for longer distances.
Sourcepub fn shift(&self, direction: ShiftTo)
pub fn shift(&self, direction: ShiftTo)
Shifts the display to the right or the left by the given offset.
Note that the first and second line will shift at the same time.
When the displayed data is shifted repeatedly each line moves only horizontally. The second line display does not shift into the first line position.
Sourcepub fn clear(&self)
pub fn clear(&self)
Clears the entire display, sets the cursor to the home position and undo all display shifts.
It also sets the cursor’s move direction to Increment.
Sourcepub fn seek_cgram(&mut self, pos: SeekFrom<U>)
pub fn seek_cgram(&mut self, pos: SeekFrom<U>)
Seeks to an offset in display character generator RAM.
Sourcepub fn write(&mut self, c: u8)
pub fn write(&mut self, c: u8)
Writes the given byte to data or character generator RAM, depending on the previous seek operation.
Sourcepub fn read_busy_flag(&self) -> (bool, u8)
pub fn read_busy_flag(&self) -> (bool, u8)
Reads busy flag and the cursor’s current address.
Sourcepub fn write_message(&mut self, msg: &str)
pub fn write_message(&mut self, msg: &str)
Writes the given message to data or character generator RAM, depending on the previous seek operation.