We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#define yield() _NOP()
inline void yield() { _NOP(); }
yield()
1 parent 84d7ad4 commit 5f9db70Copy full SHA for 5f9db70
cpp/arduino/Arduino.h
@@ -36,11 +36,11 @@ typedef uint8_t byte;
36
#define highByte(w) ((uint8_t) ((w) >> 8))
37
#define lowByte(w) ((uint8_t) ((w) & 0xff))
38
39
-// might as well use that NO-op macro for these, while unit testing
40
-// you need interrupts? interrupt yourself
41
-#define yield() _NOP()
42
-#define interrupts() _NOP()
43
-#define noInterrupts() _NOP()
+// using #define for these makes it impossible for other code to use as function
+// names!
+inline void yield() { _NOP(); }
+inline void interrupts() { _NOP(); }
+inline void noInterrupts() { _NOP(); }
44
45
// TODO: correctly establish this per-board!
46
#define F_CPU 1000000UL
0 commit comments