Skip to content

ssd1306

SSD1306 OLED display driver (128x64, I2C).

Layer 3 logical driver — knows nothing about the bus or MCU. Provides initialisation, clear, and temperature display.

The SSD1306 supports both I2C and SPI, but they are wired differently: over I2C every payload byte is prefixed with a control byte (0x00 for a command stream, 0x40 for a data/GRAM stream — see Ssd1306::cmd and write_data); over SPI there is no control byte at all — the host instead drives a dedicated D/C GPIO pin high or low around each byte. [BusHandle] exposes no GPIO control, only byte transfer, so there is no way for this crate to toggle a D/C line even if it wanted to. Inlining the I2C control byte into an SPI stream would corrupt every command, so rather than pretend to support a transport this driver cannot correctly drive, this doc is explicit: this driver is I2C-only. The board manifest (board/src/esp32_wrover.rs) attaches the display to i2c0, matching this.

struct Ssd1306<'a> { /* private fields */ }

SSD1306 OLED display (128x64, I2C).