Trait Basic

Source
pub trait Basic {
Show 32 methods // Required methods fn write_byte_to_cur(&mut self, byte: u8); fn write_graph_to_cgram(&mut self, index: u8, graph_data: &CGRAMGraph); fn clean_display(&mut self); fn return_home(&mut self); fn set_line_mode(&mut self, line: LineMode); fn get_line_mode(&self) -> LineMode; fn set_font(&mut self, font: Font); fn get_font(&self) -> Font; fn set_display_state(&mut self, display: State); fn get_display_state(&self) -> State; fn set_cursor_state(&mut self, cursor: State); fn get_cursor_state(&self) -> State; fn get_ram_type(&self) -> RAMType; fn set_cursor_blink_state(&mut self, blink: State); fn get_cursor_blink_state(&self) -> State; fn set_direction(&mut self, dir: MoveDirection); fn get_direction(&self) -> MoveDirection; fn set_shift_type(&mut self, shift: ShiftType); fn get_shift_type(&self) -> ShiftType; fn set_cursor_pos(&mut self, pos: (u8, u8)); fn set_cgram_addr(&mut self, addr: u8); fn get_cursor_pos(&self) -> (u8, u8); fn shift_cursor_or_display( &mut self, shift_type: ShiftType, dir: MoveDirection, ); fn get_display_offset(&self) -> u8; fn set_poll_interval(&mut self, interval_us: u32); fn get_poll_interval_us(&self) -> u32; fn get_line_capacity(&self) -> u8; fn set_backlight(&mut self, backlight: State); fn get_backlight(&self) -> State; fn calculate_pos_by_offset( &self, start: (u8, u8), offset: (i8, i8), ) -> (u8, u8); fn delay_ms(&mut self, ms: u32); fn delay_us(&mut self, us: u32);
}
Expand description

All basic command to control LCD1602

Required Methods§

Source

fn write_byte_to_cur(&mut self, byte: u8)

Source

fn write_graph_to_cgram(&mut self, index: u8, graph_data: &CGRAMGraph)

Note:
We allow write Font5x11 graph even under Font5x8 mode.

Source

fn clean_display(&mut self)

Source

fn return_home(&mut self)

Source

fn set_line_mode(&mut self, line: LineMode)

Source

fn get_line_mode(&self) -> LineMode

Source

fn set_font(&mut self, font: Font)

Source

fn get_font(&self) -> Font

Source

fn set_display_state(&mut self, display: State)

Source

fn get_display_state(&self) -> State

Source

fn set_cursor_state(&mut self, cursor: State)

Source

fn get_cursor_state(&self) -> State

Source

fn get_ram_type(&self) -> RAMType

Source

fn set_direction(&mut self, dir: MoveDirection)

Source

fn get_direction(&self) -> MoveDirection

Source

fn set_shift_type(&mut self, shift: ShiftType)

Source

fn get_shift_type(&self) -> ShiftType

Source

fn set_cursor_pos(&mut self, pos: (u8, u8))

Source

fn set_cgram_addr(&mut self, addr: u8)

Source

fn get_cursor_pos(&self) -> (u8, u8)

Source

fn shift_cursor_or_display(&mut self, shift_type: ShiftType, dir: MoveDirection)

Source

fn get_display_offset(&self) -> u8

Source

fn set_poll_interval(&mut self, interval_us: u32)

Source

fn get_poll_interval_us(&self) -> u32

Source

fn get_line_capacity(&self) -> u8

Source

fn set_backlight(&mut self, backlight: State)

Note: Due to driver implementation, this function may have actual effect, or not

Source

fn get_backlight(&self) -> State

Source

fn calculate_pos_by_offset(&self, start: (u8, u8), offset: (i8, i8)) -> (u8, u8)

Source

fn delay_ms(&mut self, ms: u32)

Wait for specified milliseconds

Source

fn delay_us(&mut self, us: u32)

Wait for specified microseconds

Implementors§

Source§

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