SolderedElectronics / Inkplate-Arduino-library

Inkplate family Arduino library. The easiest way to add e-paper to your project.
https://inkplate.readthedocs.io/en/latest/arduino.html
GNU Lesser General Public License v3.0
251 stars 78 forks source link

Make the Inkplate6 check the final elif in include/defines.h #238

Closed majormajors closed 10 months ago

majormajors commented 10 months ago

This prevents -DARDUINO_ESP32_DEV from clobbering the checks for other boards. This is especially a problem when building with PlatformIO and using the esp32dev board definition, which sets -DARDUINO_ESP32_DEV, necessitating the use of build_unflags in platformio.ini.

This bug causes issues for me when building for my Inkplate 6plus with PlatformIO. The following platformio.ini causes the build to fail.

[env:inkplate6plus]
platform = espressif32
board = esp32dev
board_build.f_cpu = 240000000L
framework = espidf, arduino
monitor_speed = 115200
build_flags =
  -DARDUINO_INKPLATE6PLUS
  -DBOARD_HAS_PSRAM
  -mfix-esp32-psram-cache-issue
build_unflags =
  -Werror=all
lib_deps =
  https://github.com/SolderedElectronics/Inkplate-Arduino-library

To get it to work, I need to add -DARDUINO_ESP32_DEV to build_unflags. Since I'm not sure if that will have other unintended consequences, it seemed safer to fix the order of the checks in the Inkplate library itself.