pub struct Builder<ControlPin, DBPin, const PIN_CNT: usize, Delayer>where
    ControlPin: OutputPin,
    DBPin: OutputPin + InputPin,
    Delayer: DelayMs<u32> + DelayUs<u32>,{ /* private fields */ }
Expand description

struct which collect infomation to build LCD and initialize LCD1602

Trait Implementations§

source§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> BuilderAPI<ControlPin, DBPin, PIN_CNT, Delayer> for Builder<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: OutputPin, DBPin: OutputPin + InputPin, Delayer: DelayMs<u32> + DelayUs<u32>,

source§

fn new(pins: Pins<ControlPin, DBPin, PIN_CNT>, delayer: Delayer) -> Self

combine Pins and delay timer into a Builder
source§

fn build_and_init(self) -> LCD<ControlPin, DBPin, PIN_CNT, Delayer>

consume Builder, build a LCD and initialize LCD1602
source§

fn pop_pins(&mut self) -> Pins<ControlPin, DBPin, PIN_CNT>

source§

fn pop_delayer(&mut self) -> Delayer

source§

fn set_line(self, line: LineMode) -> Self

source§

fn get_line(&self) -> LineMode

source§

fn set_font(self, font: Font) -> Self

source§

fn get_font(&self) -> Font

source§

fn set_display(self, display: State) -> Self

source§

fn get_display(&self) -> State

source§

fn set_cursor(self, cursor: State) -> Self

source§

fn get_cursor(&self) -> State

source§

fn set_direction(self, dir: MoveDirection) -> Self

source§

fn get_direction(&self) -> MoveDirection

source§

fn set_shift(self, shift: ShiftType) -> Self

source§

fn get_shift(&self) -> ShiftType

source§

fn set_wait_interval_us(self, interval: u32) -> Self

when LCD1602 report busy state, wait some time before poll the state again this function set interval (in microseconds) between 2 polls
source§

fn get_wait_interval_us(&self) -> u32

when LCD1602 report busy state, wait some time before poll the state again this function get interval value (in microseconds)

Auto Trait Implementations§

§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> RefUnwindSafe for Builder<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: RefUnwindSafe, DBPin: RefUnwindSafe, Delayer: RefUnwindSafe,

§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Send for Builder<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Send, DBPin: Send, Delayer: Send,

§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Sync for Builder<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Sync, DBPin: Sync, Delayer: Sync,

§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> Unpin for Builder<ControlPin, DBPin, PIN_CNT, Delayer>where ControlPin: Unpin, DBPin: Unpin, Delayer: Unpin,

§

impl<ControlPin, DBPin, const PIN_CNT: usize, Delayer> UnwindSafe for Builder<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.