[][src]Trait ssd1306::interface::DisplayInterface

pub trait DisplayInterface {
    type Error;
    fn send_commands(&mut self, cmd: &[u8]) -> Result<(), Self::Error>;
fn send_data(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
fn send_bounded_data(
        &mut self,
        buf: &[u8],
        disp_width: usize,
        upper_left: (u8, u8),
        lower_right: (u8, u8)
    ) -> Result<(), Self::Error>; }

A method of communicating with SSD1306

Associated Types

type Error

Interface error type

Loading content...

Required methods

fn send_commands(&mut self, cmd: &[u8]) -> Result<(), Self::Error>

Send a batch of up to 8 commands to display.

fn send_data(&mut self, buf: &[u8]) -> Result<(), Self::Error>

Send data to display.

fn send_bounded_data(
    &mut self,
    buf: &[u8],
    disp_width: usize,
    upper_left: (u8, u8),
    lower_right: (u8, u8)
) -> Result<(), Self::Error>

Send data to display, taking advantage of bounded data.

upper_left and lower_right should contain the x and y coordinates of the minimum bounding rectangle of the modified pixels.

Loading content...

Implementors

impl<I2C, CommE> DisplayInterface for I2cInterface<I2C> where
    I2C: Write<Error = CommE>, 
[src]

type Error = Error<CommE, ()>

impl<SPI, DC, CommE, PinE> DisplayInterface for SpiInterface<SPI, DC> where
    SPI: Write<u8, Error = CommE>,
    DC: OutputPin<Error = PinE>, 
[src]

type Error = Error<CommE, PinE>

Loading content...