Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago.
mbed SDK official #ifdef directive
Hi,
I am porting a library over to mbed, is there an official #ifdef directive for mbed SDK ? which i can use #ifdef to select mbed version of the codes when it compile under mbed.
thank
jhleong
2 Answers
9 years, 9 months ago.
There are a few different ones you can use, but MBED_H should always be there, so I would just use that one.
9 years, 9 months ago.
Hi,
there's MBED_LIBRARY_VERSION , located in the mbed.h file. Can you specify the use case you want to use version macro?
If I understand it correctly he doesn't care about the mbed version, but he for example has code which uses DigitalOut for the mbed version, and DigitalWrite for the arduino version.
posted by 11 Feb 2015