adafruit / Adafruit_SSD1306

Arduino library for SSD1306 monochrome 128x64 and 128x32 OLEDs
http://www.adafruit.com/category/63_98
Other
1.75k stars 964 forks source link

Add support for Particle MCUs' I2C buffer sizing #184

Closed rgiese closed 3 years ago

rgiese commented 3 years ago

This makes the library compatible with Particle MCUs (or at any rate the Argon I tested it on).

Every vendor seems to have their own special way of sizing their I2C transmit buffers, and the Particle HAL has yet another way and #define that exposes their default size. Annoyingly, their default buffer length (I2C_BUFFER_LENGH = 32) is different from their default serial buffer length (SERIAL_BUFFER_SIZE = 64), so the #else fallback to 32 doesn't pan out.

Suggestions for future work:

It would awesome if the standard Wire protocol exposed its dang buffer size, but that's for another day...

Test coverage: tested on my Particle Argon with an Adafruit 128x32 OLED Featherwing.

ladyada commented 3 years ago

thanx!