[][src]Module sh1106::interface

sh1106 Communication Interface (I2C/SPI)

These are the two supported interfaces for communicating with the display. They're used by the builder methods connect_i2c and connect_spi.

The types that these interfaces define are quite lengthy, so it is recommended that you create a type alias. Here's an example for the I2C1 on an STM32F103xx:

type OledDisplay = GraphicsMode<
    I2cInterface<I2c<I2C1, (PB8<Alternate<OpenDrain>>, PB9<Alternate<OpenDrain>>)>>,
>;

Here's one for SPI1 on an STM32F103xx:

pub type OledDisplay = GraphicsMode<
    SpiInterface<
        Spi<
            SPI1,
            (
                PA5<Alternate<PushPull>>,
                PA6<Input<Floating>>,
                PA7<Alternate<PushPull>>,
            ),
        >,
        PB1<Output<PushPull>>,
    >,
>;

Re-exports

pub use self::i2c::I2cInterface;
pub use self::spi::SpiInterface;

Modules

i2c

SH1106 I2C Interface

spi

sh1106 SPI interface

Traits

DisplayInterface

A method of communicating with sh1106