File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
15
15
- Properly report compile errors in GitHub Actions (#296 )
16
16
- Put build artifacts in a separate directory to reduce clutter.
17
17
- Change 266 files from CRLF to LF.
18
+ - Replace ` #define yield() _NOP() ` with ` inline void yield() { _NOP(); } ` so that other code can define a ` yield() ` function.
18
19
- Update .gitattributes so we have consistent line endings
19
20
- Run tests on push as well as on a pull request so developers can see impact
20
21
Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ typedef uint8_t byte;
36
36
#define highByte (w ) ((uint8_t) ((w) >> 8))
37
37
#define lowByte (w ) ((uint8_t) ((w) & 0xff))
38
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()
39
+ // using #define for these makes it impossible for other code to use as function
40
+ // names!
41
+ inline void yield () { _NOP (); }
42
+ inline void interrupts () { _NOP (); }
43
+ inline void noInterrupts () { _NOP (); }
44
44
45
45
// TODO: correctly establish this per-board!
46
46
#define F_CPU 1000000UL
You can’t perform that action at this time.
0 commit comments