[][src]Trait ili9341::Interface

pub trait Interface {
    type Error;
    fn write(&mut self, command: u8, data: &[u8]) -> Result<(), Self::Error>;
fn write_iter(
        &mut self,
        command: u8,
        data: impl IntoIterator<Item = u16>
    ) -> Result<(), Self::Error>; }

Trait representing the interface to the hardware.

Intended to abstract the various buses (SPI, MPU 8/9/16-bit) from the Controller code.

Associated Types

type Error

Loading content...

Required methods

fn write(&mut self, command: u8, data: &[u8]) -> Result<(), Self::Error>

Sends a command with a sequence of 8-bit arguments

Mostly used for sending configuration commands

fn write_iter(
    &mut self,
    command: u8,
    data: impl IntoIterator<Item = u16>
) -> Result<(), Self::Error>

Sends a command with a sequence of 16-bit data words

Mostly used for sending MemoryWrite command and other commands with 16-bit arguments

Loading content...

Implementors

Loading content...