pub struct I8080<'d, Dm: DriverMode> { /* private fields */ }
unstable
only.Expand description
Represents the I8080 LCD interface.
Implementations§
Source§impl<'d, Dm> I8080<'d, Dm>where
Dm: DriverMode,
impl<'d, Dm> I8080<'d, Dm>where
Dm: DriverMode,
Sourcepub fn new<P, CH>(
lcd: Lcd<'d, Dm>,
channel: impl Peripheral<P = CH> + 'd,
pins: P,
config: Config,
) -> Result<Self, ConfigError>where
CH: TxChannelFor<LCD_CAM>,
P: TxPins,
pub fn new<P, CH>(
lcd: Lcd<'d, Dm>,
channel: impl Peripheral<P = CH> + 'd,
pins: P,
config: Config,
) -> Result<Self, ConfigError>where
CH: TxChannelFor<LCD_CAM>,
P: TxPins,
Creates a new instance of the I8080 LCD interface.
Sourcepub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>
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.
Sourcepub fn set_byte_order(&mut self, byte_order: ByteOrder) -> &mut Self
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.
Sourcepub fn set_8bits_order(&mut self, byte_order: ByteOrder) -> &mut Self
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.
Sourcepub fn set_bit_order(&mut self, bit_order: BitOrder) -> &mut Self
pub fn set_bit_order(&mut self, bit_order: BitOrder) -> &mut Self
Configures the bit order for data transmission.
Sourcepub fn with_cs<CS: PeripheralOutput>(
self,
cs: impl Peripheral<P = CS> + 'd,
) -> Self
pub fn with_cs<CS: PeripheralOutput>( self, cs: impl Peripheral<P = CS> + 'd, ) -> Self
Associates a CS pin with the I8080 interface.
Sourcepub fn with_ctrl_pins<DC: PeripheralOutput, WRX: PeripheralOutput>(
self,
dc: impl Peripheral<P = DC> + 'd,
wrx: impl Peripheral<P = WRX> + 'd,
) -> Self
pub fn with_ctrl_pins<DC: PeripheralOutput, WRX: PeripheralOutput>( self, dc: impl Peripheral<P = DC> + 'd, wrx: impl Peripheral<P = WRX> + 'd, ) -> Self
Configures the control pins for the I8080 interface.
Sourcepub 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)>
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.