Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lowByte macro is broken since 2.4.0 #515

Closed
oseiler2 opened this issue Sep 2, 2021 · 1 comment
Closed

lowByte macro is broken since 2.4.0 #515

oseiler2 opened this issue Sep 2, 2021 · 1 comment

Comments

@oseiler2
Copy link
Contributor

oseiler2 commented Sep 2, 2021

Since updating to 2.4.0 I'm getting an error for using the lowByte macro:
Arduino IDE 1.8.13:
\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.4.0\cores\megatinycore/api/Common.h:70:18: error: 'w' was not declared in this scope #define lowByte (w) ((uint8_t) ((w) & 0xff)) ^ \Local\Temp\arduino_modified_sketch_443879\sketch_sep02a.ino:2:3: note: in expansion of macro 'lowByte' lowByte(0xaa55); ^~~~~~~

Platform.io:
\.platformio\packages\framework-arduino-megaavr-megatinycore\cores\megatinycore/api/Common.h:70:18: error: 'w' was not declared in this scope #define lowByte (w) ((uint8_t) ((w) & 0xff)) ^ src\main.cpp:310:20: note: in expansion of macro 'lowByte' c_payload[0] = lowByte(PROBE_INTERVAL); ^~~~~~~

The last commit on that file introduced a whitespace before the first bracket. Removing that fixes it for me.
#define lowByte (w) ((uint8_t) ((w) & 0xff))

PR to follow.

@oseiler2
Copy link
Contributor Author

oseiler2 commented Sep 2, 2021

... and yes I feel silly for relying on a really silly hand-holding macro :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants