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§
fn write_byte_to_cur(&mut self, byte: u8)
Sourcefn write_graph_to_cgram(&mut self, index: u8, graph_data: &CGRAMGraph)
fn write_graph_to_cgram(&mut self, index: u8, graph_data: &CGRAMGraph)
Note:
We allow write Font5x11 graph even under Font5x8 mode.
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
Sourcefn set_backlight(&mut self, backlight: State)
fn set_backlight(&mut self, backlight: State)
Note: Due to driver implementation, this function may have actual effect, or not