-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send notifications to ExtUI for M0/M1 (#13344)
- Send notifications to ExtUI for M0/M1 - wait_for_user can be non-volatile (not changed by interrupt) C / C++ compilers don't optimize away reads of non-volatile variables when a function call is used between accesses, because *any* variable could be changed by the function call. Since `wait_for_user` can't be changed without a function call, it should be non-volatile so the compiler can optimize away cases where it is read more than once without an intervening function call.
- Loading branch information
1 parent
00fc431
commit 60e82e3
Showing
6 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60e82e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wont compile reverting marlin.ccp & .h allows compile.
In file included from /tmp/arduino_build_210419/sketch/src/HAL/HAL_AVR/MarlinSerial.cpp:58:0:
/tmp/arduino_build_210419/sketch/src/HAL/HAL_AVR/../../feature/emergency_parser.h:35:22: error: conflicting declaration 'volatile bool wait_for_user'
extern volatile bool wait_for_user, wait_for_heatup;
^
In file included from /tmp/arduino_build_210419/sketch/src/HAL/HAL_AVR/MarlinSerial.cpp:44:0:
/tmp/arduino_build_210419/sketch/src/HAL/HAL_AVR/../../Marlin.h:336:15: note: previous declaration as 'bool wait_for_user'
extern bool wait_for_user;
^