Struct lcd1602_driver::LCD
source · pub struct LCD<ControlPin, DBPin, const PIN_CNT: usize, Delayer>where
ControlPin: OutputPin,
DBPin: OutputPin + InputPin,
Delayer: DelayMs<u32> + DelayUs<u32>,{ /* private fields */ }
Expand description
The main struct for operating the LCD1602
Trait Implementations§
source§impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDAnimation for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where
ControlPin: OutputPin,
DBPin: OutputPin + InputPin,
Delayer: DelayMs<u32> + DelayUs<u32>,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDAnimation for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: OutputPin, DBPin: OutputPin + InputPin, Delayer: DelayMs<u32> + DelayUs<u32>,
source§fn full_display_blink(&mut self, count: u32, interval_us: u32)
fn full_display_blink(&mut self, count: u32, interval_us: u32)
Make the entire screen blink Read more
source§fn split_flap_write(
&mut self,
str: &str,
fs: FlipStyle,
max_flip_count: u8,
per_flip_delay_us: u32,
per_char_delay_us: Option<u32>
)
fn split_flap_write( &mut self, str: &str, fs: FlipStyle, max_flip_count: u8, per_flip_delay_us: u32, per_char_delay_us: Option<u32> )
Split-Flap-style display Read more
source§impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDBasic for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where
ControlPin: OutputPin,
DBPin: OutputPin + InputPin,
Delayer: DelayMs<u32> + DelayUs<u32>,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDBasic for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: OutputPin, DBPin: OutputPin + InputPin, Delayer: DelayMs<u32> + DelayUs<u32>,
fn clean_display(&mut self)
fn return_home(&mut self)
fn set_cgram_addr(&mut self, addr: u8)
fn write_graph_to_cur(&mut self, index: u8)
fn write_u8_to_cur(&mut self, byte: impl Into<u8>)
fn read_u8_from_cur(&mut self) -> u8
fn write_graph_to_cgram(&mut self, index: u8, graph_data: &[u8; 8])
fn shift_cursor_or_display(&mut self, st: ShiftType, dir: MoveDirection)
fn get_display_offset(&self) -> u8
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 set_cursor_blink_state(&mut self, blink: State)
fn get_cursor_blink_state(&self) -> State
fn set_default_direction(&mut self, dir: MoveDirection)
fn get_default_direction(&self) -> MoveDirection
fn set_default_shift_type(&mut self, shift: ShiftType)
fn get_default_shift_type(&self) -> ShiftType
fn set_cursor_pos(&mut self, pos: (u8, u8))
fn get_cursor_pos(&self) -> (u8, u8)
fn set_wait_interval_us(&mut self, interval: u32)
fn get_wait_interval_us(&self) -> u32
fn get_ram_type(&self) -> RAMType
fn get_line_capacity(&self) -> u8
source§impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDExt for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where
ControlPin: OutputPin,
DBPin: OutputPin + InputPin,
Delayer: DelayMs<u32> + DelayUs<u32>,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> LCDExt for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: OutputPin, DBPin: OutputPin + InputPin, Delayer: DelayMs<u32> + DelayUs<u32>,
source§fn write_char_to_cur(&mut self, char: char)
fn write_char_to_cur(&mut self, char: char)
In this implementation, character only support
from ASCII 0x20 (white space) to ASCII 0x7D (}
)
source§fn toggle_display(&mut self)
fn toggle_display(&mut self)
toggle entire display on and off (it doesn’t toggle backlight)
source§fn write_str_to_cur(&mut self, str: &str)
fn write_str_to_cur(&mut self, str: &str)
write string to current position
source§fn write_graph_to_pos(&mut self, index: u8, pos: (u8, u8))
fn write_graph_to_pos(&mut self, index: u8, pos: (u8, u8))
write custom graph to specific position
source§fn write_byte_to_pos(&mut self, byte: impl Into<u8>, pos: (u8, u8))
fn write_byte_to_pos(&mut self, byte: impl Into<u8>, pos: (u8, u8))
write a byte to specific position
fn read_graph_from_cgram(&mut self, index: u8) -> [u8; 8]
fn offset_cursor_pos(&mut self, offset: (i8, i8))
Auto Trait Implementations§
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> RefUnwindSafe for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: RefUnwindSafe, DBPin: RefUnwindSafe, Delayer: RefUnwindSafe,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Send for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Send, DBPin: Send, Delayer: Send,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Sync for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Sync, DBPin: Sync, Delayer: Sync,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Unpin for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Unpin, DBPin: Unpin, Delayer: Unpin,
impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> UnwindSafe for LCD<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: UnwindSafe, DBPin: UnwindSafe, Delayer: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more