I am developing similar code to run on Adafruit M0 Express, Adafruit Itsy Bitsy M0 and Sparkfun Red Board Turbo. I am using Visual Studio as the development environment. As the boards have different pin maps I need to have different code for the different boards ideally by having generic code and board specific definitions.
In Visual Studio when I select the Adafruit boards a board name is added to the project symbols. However selecting the Sparkfun board gives no similar definition.
I can’t locate where the board name is coming from so can’t automatically identify the board using this type of pre-processing
#ifdef SPARKFUN_REDTURBO // not automatically added to Visual Sudio
// pin definitions for Sparkfun Board
#elif defined ADAFRUIT_EXPRESS_M0 //automatically added to Visual Studio
//my pin definitions for Adafruit board
#endif
Any suggestions?
Ted