Trait Ext

Source
pub trait Ext: Basic {
    // Provided methods
    fn toggle_display(&mut self) { ... }
    fn write_char_to_cur(&mut self, char: char) { ... }
    fn write_str_to_cur(&mut self, str: &str) { ... }
    fn write_byte_to_pos(&mut self, byte: u8, pos: (u8, u8)) { ... }
    fn write_char_to_pos(&mut self, char: char, pos: (u8, u8)) { ... }
    fn write_str_to_pos(&mut self, str: &str, pos: (u8, u8)) { ... }
    fn write_graph_to_cur(&mut self, index: u8) { ... }
    fn write_graph_to_pos(&mut self, index: u8, pos: (u8, u8)) { ... }
    fn offset_cursor_pos(&mut self, offset: (i8, i8)) { ... }
}
Expand description

Useful command to control LCD1602

Provided Methods§

Source

fn toggle_display(&mut self)

toggle entire display on and off (it doesn’t toggle backlight)

Source

fn write_char_to_cur(&mut self, char: char)

write char to current position In default implementation, character only support from ASCII 0x20 (white space) to ASCII 0x7D (})

Source

fn write_str_to_cur(&mut self, str: &str)

write string to current position

Source

fn write_byte_to_pos(&mut self, byte: u8, pos: (u8, u8))

write a byte to specific position

Source

fn write_char_to_pos(&mut self, char: char, pos: (u8, u8))

write a char to specific position

Source

fn write_str_to_pos(&mut self, str: &str, pos: (u8, u8))

write string to specific position

Source

fn write_graph_to_cur(&mut self, index: u8)

write custom graph to current position

If you write 5x11 Font graph, but only want to access upper part of the graph in 5x8 Font mode,
you will need to shift index one bit left to get correct graph.

Source

fn write_graph_to_pos(&mut self, index: u8, pos: (u8, u8))

write custom graph to specific position

If you write 5x11 Font graph, but only want to access upper part of the graph in 5x8 Font mode,
you will need to shift index one bit left to get correct graph.

Source

fn offset_cursor_pos(&mut self, offset: (i8, i8))

change cursor position with relative offset

Implementors§

Source§

impl<'a, 'b, Sender, Delayer, const READABLE: bool> Ext for Lcd<'a, 'b, Sender, Delayer, READABLE>
where Delayer: DelayNs, Sender: SendCommand<Delayer, READABLE>,