Struct Lcd

Source
pub struct Lcd<S, WORD> { /* private fields */ }
Expand description

An interface to an LCD controller using one sub-bank

This struct provides low-level read and write commands that can be used to implement drivers for LCD controllers. Each function corresponds to exactly one transaction on the bus.

Implementations§

Source§

impl<S, WORD: Word> Lcd<S, WORD>
where S: SubBank,

Source

pub fn write_data(&mut self, value: WORD)

Writes a value with the data/command (address) signals set high

Source

pub fn write_command(&mut self, value: WORD)

Writes a value with the data/command (address) signals set low

Source

pub fn read_data(&self) -> WORD

Reads a value with the data/command (address) signals set high

Source

pub fn read_command(&self) -> WORD

Reads a value with the data/command (address) signals set low

Trait Implementations§

Source§

impl<S> WriteOnlyDataCommand for Lcd<S, u16>
where S: SubBank,

Source§

fn send_commands(&mut self, cmd: DataFormat<'_>) -> Result<(), DisplayError>

Send a batch of commands to display
Source§

fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>

Send pixel data to display
Source§

impl<S> WriteOnlyDataCommand for Lcd<S, u16>
where S: SubBank,

Source§

fn send_commands(&mut self, cmd: DataFormat<'_>) -> Result<(), DisplayError>

Send a batch of commands to display
Source§

fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>

Send pixel data to display
Source§

impl<S> WriteOnlyDataCommand for Lcd<S, u8>
where S: SubBank,

Source§

fn send_commands(&mut self, cmd: DataFormat<'_>) -> Result<(), DisplayError>

Send a batch of commands to display
Source§

fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>

Send pixel data to display
Source§

impl<S> WriteOnlyDataCommand for Lcd<S, u8>
where S: SubBank,

Source§

fn send_commands(&mut self, cmd: DataFormat<'_>) -> Result<(), DisplayError>

Send a batch of commands to display
Source§

fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>

Send pixel data to display

Auto Trait Implementations§

§

impl<S, WORD> Freeze for Lcd<S, WORD>

§

impl<S, WORD> RefUnwindSafe for Lcd<S, WORD>
where S: RefUnwindSafe, WORD: RefUnwindSafe,

§

impl<S, WORD> Send for Lcd<S, WORD>
where S: Send, WORD: Send,

§

impl<S, WORD> Sync for Lcd<S, WORD>
where S: Sync, WORD: Sync,

§

impl<S, WORD> Unpin for Lcd<S, WORD>
where S: Unpin, WORD: Unpin,

§

impl<S, WORD> UnwindSafe for Lcd<S, WORD>
where S: UnwindSafe, WORD: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.