OledDisplay::Init with Daisy Submodule help

I’ve gotten a SSD1306 display working with the Daisy, so I’ve been doing some digging through the source to determine why it doesn’t seem to work with my patch_sm.

I think there may be an issue with the oled_ssd130x implementation that is causing an incompatibility with the patch_sm. It looks here as if the patch_sm exposes SPI_2 for SPI communications. It seems like SPI_2 uses a different set of pins, and perhaps different internal SPI hardware than the Daisy uses for communication with an SPI display?

Looking at the Daisy oled_ssd130x implementation here, it seems like it defaults to SPI_1 and a different set of pins, with no option to configure which SPI hardware/pins are used. (other than DC/CS) Unless I’ve missed something, I think it’s impossible to get these SPI displays working with the daisy oled_ssd130x library without modifying the libDaisy source code so that it uses the SPI hardware exposed on the patch_sm.

I gave it a shot by changing the peripheral handle to SpiHandle::Config::Peripheral::SPI_2 and modifying the pins used in oled_ssd130x.h but didn’t have any luck getting the display to work. Unfortunately I don’t know quite enough about the Daisy/patch_sm hardware to hack a working fix together.

2 Likes