Function-style critical section macros
This commit is contained in:
1 parent
7b02a62da8
commit
fa6e7cb733
15 files changed
+42
-42
No files matched your search
@@ -63,13 +63,13 @@ void Buzzer::tick() {
|
||||
|
||||
if (state.tone.frequency > 0) {
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
CRITICAL_SECTION_START;
|
||||
CRITICAL_SECTION_START();
|
||||
ExtUI::onPlayTone(state.tone.frequency, state.tone.duration);
|
||||
CRITICAL_SECTION_END;
|
||||
CRITICAL_SECTION_END();
|
||||
#elif ENABLED(SPEAKER)
|
||||
CRITICAL_SECTION_START;
|
||||
CRITICAL_SECTION_START();
|
||||
::tone(BEEPER_PIN, state.tone.frequency, state.tone.duration);
|
||||
CRITICAL_SECTION_END;
|
||||
CRITICAL_SECTION_END();
|
||||
#else
|
||||
on();
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user