define printf_P
as Serial.printf
on ESP32/8266 and RP2040 (arduino-pico) cores
#870
Labels
printf_P
as Serial.printf
on ESP32/8266 and RP2040 (arduino-pico) cores
#870
In researching how to test #864 (because I needed to call
printDetails()
) I found a solution to work well with the following Arduino coresAll of those cores have
Serial.printf()
defined usingvsnprintf()
(similar to the adafruit/arduinocore-samd). However, the ESP32 core hasprintf_P
already defined in the extensa toolchain. So, I'm proposingI already tested these changes on my QtPy boards using either ESP32-S2 or RP2040
Additional context
#undef printf_P
I'm not sure if this lib works as is in the espressif SDK for the ESP32, but I wanted to make sure that we only
#undef printf_P
when using the ESP32 Arduino core only.defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)
Because the arduino cores that wrap mbed framework may not actually define
Serial.printf()
, I wanted to make sure that the definition ofprintf_P
only applied to the arduino-pico core, a very popular RP2040 core that supports all boards that the PicoSDK supports and additionally multi-core processing and the PicoSDK's assembly routines feature...The text was updated successfully, but these errors were encountered: