From 38be1d964ca1f45ad430dd64193d54af5b8c9afb Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 18 Sep 2022 05:29:14 -0700 Subject: [PATCH 1/2] add printf support to ESP* and arduino-pico cores --- RF24_config.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RF24_config.h b/RF24_config.h index c5926e92b..7642d803e 100644 --- a/RF24_config.h +++ b/RF24_config.h @@ -159,12 +159,18 @@ extern HardwareSPI SPI; #endif // defined (__ARDUINO_X86__) // Progmem is Arduino-specific - #if defined(ARDUINO_ARCH_ESP8266) || defined(ESP32) + #if defined(ARDUINO_ARCH_ESP8266) || defined(ESP32) || (defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)) #include #define PRIPSTR "%s" #ifndef pgm_read_ptr #define pgm_read_ptr(p) (*(void* const*)(p)) #endif + // Serial.printf() is no longer defined in the unifying Arduino/ArduinoCore-API repo + // Serial.printf() is defined if using the arduino-pico/esp32/8266 repo + #if defined(ARDUINO_ARCH_ESP32) // do not `undef` when using the espressif SDK only + #undef printf_P // needed for ESP32 core + #endif + #define printf_P Serial.printf #elif defined(ARDUINO) && !defined(ESP_PLATFORM) && !defined(__arm__) && !defined(__ARDUINO_X86__) || defined(XMEGA) #include #define PRIPSTR "%S" From d582f7897679a234019efc968a77a7e3567b2d1b Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 18 Sep 2022 07:02:51 -0700 Subject: [PATCH 2/2] add ESP32/8266 boards to PlatformIO CI Arduino CLI seems to have trouble getting the esp* core that corresponds to the fqbn prefix --- .github/workflows/build_platformIO.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index 286b67131..b5f2e2a8a 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -114,6 +114,8 @@ jobs: - "teensylc" - "genericSTM32F411CE" - "blackpill_f103c8" + - "nodemcuv2" + - "adafruit_qtpy_esp32s2" steps: - uses: actions/checkout@v2