File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 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/).
1515- Properly report compile errors in GitHub Actions (#296 )
1616- Put build artifacts in a separate directory to reduce clutter.
1717- 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.
1819- Update .gitattributes so we have consistent line endings
1920- Run tests on push as well as on a pull request so developers can see impact
2021
Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ typedef uint8_t byte;
3636#define highByte (w ) ((uint8_t) ((w) >> 8))
3737#define lowByte (w ) ((uint8_t) ((w) & 0xff))
3838
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 (); }
4444
4545// TODO: correctly establish this per-board!
4646#define F_CPU 1000000UL
You can’t perform that action at this time.
0 commit comments