Skip to content

Commit

Permalink
Update MCUdude_corefiles
Browse files Browse the repository at this point in the history
Fix typo in abs() macro
Merge commit '648e78f0ea17b7e92f708ac07f537e79193ba4b9'
  • Loading branch information
MCUdude committed Mar 1, 2021
2 parents 2e988f9 + 648e78f commit f13af65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avr/cores/MCUdude_corefiles/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void yield(void);
#undef abs
#endif

#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -x; })
#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -_x; })
#define sq(x) ({ typeof (x) _x = (x); _x * _x; })
#define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
#define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
Expand Down

0 comments on commit f13af65

Please sign in to comment.