Is there a #define for distinguishing the XIAO SAMD21 Cortex M0+?
For instance:
#if defined(ARDUINO_ARCH_AVR)
// It's an Arduino UNO
#elif defined(ARDUINO_ARCH_ESP32)
// It's an ESP32
#elif defined(SEEEDUINO_XIAO_SAMD21_OR_SOME_SUCH)
// It's an XIAO...
#endif
I have an application that compiles/runs for Arduino, Trinket M0, and XIAO. I use the define:
SEEED_XIAO_M0
to detect the XIAO. If you turn on the detail output from the compiler and look at the gcc commands you can see the various defines (e.g. -D SEEED_XIAO_M0) used for the different platforms.
2 Likes