Struct I8080

Source
pub struct I8080<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature unstable only.
Expand description

Represents the I8080 LCD interface.

Implementations§

Source§

impl<'d, Dm> I8080<'d, Dm>
where Dm: DriverMode,

Source

pub fn new( lcd: Lcd<'d, Dm>, channel: impl TxChannelFor<LCD_CAM<'d>>, pins: impl TxPins, config: Config, ) -> Result<Self, ConfigError>

Creates a new instance of the I8080 LCD interface.

Source

pub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>

Applies configuration.

§Errors

ConfigError::Clock variant will be returned if the frequency passed in Config is too low.

Source

pub fn set_byte_order(&mut self, byte_order: ByteOrder) -> &mut Self

Configures the byte order for data transmission in 16-bit mode. This must be set to ByteOrder::default() when transmitting in 8-bit mode.

Source

pub fn set_8bits_order(&mut self, byte_order: ByteOrder) -> &mut Self

Configures the byte order for data transmission in 8-bit mode. This must be set to ByteOrder::default() when transmitting in 16-bit mode.

Source

pub fn set_bit_order(&mut self, bit_order: BitOrder) -> &mut Self

Configures the bit order for data transmission.

Source

pub fn with_cs(self, cs: impl PeripheralOutput<'d>) -> Self

Associates a CS pin with the I8080 interface.

Source

pub fn with_ctrl_pins( self, dc: impl PeripheralOutput<'d>, wrx: impl PeripheralOutput<'d>, ) -> Self

Configures the control pins for the I8080 interface.

Source

pub fn send<W: Into<u16> + Copy, BUF: DmaTxBuffer>( self, cmd: impl Into<Command<W>>, dummy: u8, data: BUF, ) -> Result<I8080Transfer<'d, BUF, Dm>, (DmaError, Self, BUF)>

Sends a command and data to the LCD using DMA.

Passing a Command<u8> will make this an 8-bit transfer and a Command<u16> will make this a 16-bit transfer.

Note: A 16-bit transfer on an 8-bit bus will silently truncate the 2nd byte and an 8-bit transfer on a 16-bit bus will silently pad each byte to 2 bytes.

Trait Implementations§

Source§

impl<Dm: DriverMode> Debug for I8080<'_, Dm>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'d, Dm> Freeze for I8080<'d, Dm>

§

impl<'d, Dm> RefUnwindSafe for I8080<'d, Dm>
where Dm: RefUnwindSafe,

§

impl<'d, Dm> Send for I8080<'d, Dm>
where Dm: Send,

§

impl<'d, Dm> Sync for I8080<'d, Dm>
where Dm: Sync,

§

impl<'d, Dm> Unpin for I8080<'d, Dm>
where Dm: Unpin,

§

impl<'d, Dm> !UnwindSafe for I8080<'d, Dm>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.