Module sh1106::interface [−][src]
Expand description
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, spi::Spi1NoRemap, ( PA5<Alternate<PushPull>>, PA6<Input<Floating>>, PA7<Alternate<PushPull>>, ), u8 >, PB1<Output<PushPull>>, sh1106::builder::NoOutputPin, >, >;
Re-exports
pub use self::i2c::I2cInterface;
pub use self::spi::SpiInterface;
Modules
Traits
A method of communicating with sh1106