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>,

Make the entire screen blink Read more
source§

fn typewriter_write(&mut self, str: &str, delay_us: u32)

Typewriter-style display 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> )

Split-Flap-style display Read more
source§

fn shift_display_to_pos( &mut self, target_pos: u8, ms: MoveStyle, display_state_when_shift: State, delay_us_per_step: u32 )

Move the display window to the specified position (measured from the upper-left corner of the display) Read more
source§

fn delay_ms(&mut self, ms: u32)

Wait for specified milliseconds
source§

fn delay_us(&mut self, us: u32)

Wait for specified microseconds
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>,

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>,

source§

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)

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

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

write string to current position
source§

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

write string to specific position
source§

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))

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 read_byte_from_pos(&mut self, pos: (u8, u8)) -> u8

read a byte from specific position
source§

fn read_graph_from_cgram(&mut self, index: u8) -> [u8; 8]

source§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.