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(
lcd: Lcd<'d, Dm>,
channel: impl TxChannelFor<LCD_CAM<'d>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new( lcd: Lcd<'d, Dm>, channel: impl TxChannelFor<LCD_CAM<'d>>, config: Config, ) -> Result<Self, ConfigError>
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(self, cs: impl PeripheralOutput<'d>) -> Self
pub fn with_cs(self, cs: impl PeripheralOutput<'d>) -> Self
Associates a CS pin with the I8080 interface.
Sourcepub fn with_dc(self, dc: impl PeripheralOutput<'d>) -> Self
pub fn with_dc(self, dc: impl PeripheralOutput<'d>) -> Self
Associates a DC pin with the I8080 interface.
Sourcepub fn with_wrx(self, wrx: impl PeripheralOutput<'d>) -> Self
pub fn with_wrx(self, wrx: impl PeripheralOutput<'d>) -> Self
Associates a WRX pin with the I8080 interface.
Sourcepub fn with_data0(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data0(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 0 pin with the I8080 interface.
Sourcepub fn with_data1(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data1(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 1 pin with the I8080 interface.
Sourcepub fn with_data2(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data2(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 2 pin with the I8080 interface.
Sourcepub fn with_data3(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data3(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 3 pin with the I8080 interface.
Sourcepub fn with_data4(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data4(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 4 pin with the I8080 interface.
Sourcepub fn with_data5(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data5(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 5 pin with the I8080 interface.
Sourcepub fn with_data6(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data6(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 6 pin with the I8080 interface.
Sourcepub fn with_data7(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data7(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 7 pin with the I8080 interface.
Sourcepub fn with_data8(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data8(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 8 pin with the I8080 interface.
Sourcepub fn with_data9(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data9(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 9 pin with the I8080 interface.
Sourcepub fn with_data10(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data10(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 10 pin with the I8080 interface.
Sourcepub fn with_data11(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data11(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 11 pin with the I8080 interface.
Sourcepub fn with_data12(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data12(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 12 pin with the I8080 interface.
Sourcepub fn with_data13(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data13(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 13 pin with the I8080 interface.
Sourcepub fn with_data14(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data14(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 14 pin with the I8080 interface.
Sourcepub fn with_data15(self, pin: impl PeripheralOutput<'d>) -> Self
pub fn with_data15(self, pin: impl PeripheralOutput<'d>) -> Self
Associate a DATA 15 pin with 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.