adafruit / Adafruit_EPD

e-paper display driver for Arduino
140 stars 57 forks source link

Allow use of EPD displays on secondary SPI #18

Closed joeycastillo closed 4 years ago

joeycastillo commented 4 years ago

This pull request adds a SPI parameter to the Adafruit_EPD hardware SPI constructor. It allows an Adafruit_EPD subclass the option of working on a secondary SPI bus. The change should be pretty minimal and backwards-compatible; the initializer defaults to the main SPI, and no code changes are necessary for any of the existing display classes (unless you want them to opt in to this functionality, which may be an edge case for most folks).

This change allows a user of the library to create their own Adafruit_EPD subclass that works on the secondary SPI bus (like I've done here).

ladyada commented 4 years ago

hihi have you tried passing in both &SPI and &SPI1?

joeycastillo commented 4 years ago

Yep! When I pass in &SPI1 I'm able to talk to a display on the secondary SPI bus.