[][src]Trait sh1106::interface::DisplayInterface

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

A method of communicating with sh1106

Associated Types

type Error[src]

Interface error type

Loading content...

Required methods

pub fn init(&mut self) -> Result<(), Self::Error>[src]

Initialize device.

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

Send a batch of up to 8 commands to display.

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

Send data to display.

Loading content...

Implementors

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

type Error = Error<CommE, ()>

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

type Error = Error<CommE, PinE>

Loading content...