adafruit / Adafruit_EPD

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

Updating examples for Feather RP2040 ThinkInk #74

Closed BlitzCityDIY closed 1 year ago

BlitzCityDIY commented 1 year ago

Adding ifdef detection for Feather RP2040 ThinkInk to use 24 pin connector pins and SPI1. Tested with hardware

caternuson commented 1 year ago

You can actually test for a specific board using the configuration from boards.txt. For the Feather RP2040 ThinkInk, it's here: https://github.com/earlephilhower/arduino-pico/blob/3dee0a276b63c42899bc1d705d1e4de774f7e023/boards.txt#L1853

That gets prepended with ARDUINO_, so the final check would look like:

ifdef (ARDUINO_ADAFRUIT_FEATHER_RP2040_THINKINK)

That could be a cleaner way to setup the logic instead of looking for the pin.

Is clang-format not indenting the lines in the clauses? (the #define lines)

BlitzCityDIY commented 1 year ago

oh cool, thanks @caternuson i did not know that. just fixed that.

for clang- ran it again after making that change and it unindented the #define lines. i could indent them manually though if you prefer that format?

caternuson commented 1 year ago

Oh well, whatever clang wants.

Did you test this to be sure it worked? The CI isn't currently checking anything RP2040 based.

BlitzCityDIY commented 1 year ago

@caternuson yes, tested this updated board detection with the Feather ThinkInk and the regular pins with a QT Py RP2040