Skip to content

Commit 1c4c559

Browse files
committed
Fix F() macro inclusion issues
1 parent 8124313 commit 1c4c559

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cores/arduino/Arduino.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@
2323
#if defined(__cplusplus)
2424
#if !defined(ARDUINO_AS_MBED_LIBRARY)
2525
#define PinMode MbedPinMode
26-
#endif
26+
#ifdef F
27+
#define Arduino_F F
28+
#undef F
29+
#endif // F (mbed included after arduino.h)
30+
#define F Mbed_F
2731
#include "mbed.h"
2832
#undef PinMode
29-
#endif
33+
#undef F
34+
#endif // !ARDUINO_AS_MBED_LIBRARY
35+
#endif //__cplusplus
3036

3137
#if defined(ARDUINO_AS_MBED_LIBRARY)
3238
#define PinMode ArduinoPinMode

0 commit comments

Comments
 (0)