Button ISR runs thread asap (#3801)

This commit is contained in:
todd-herbert 2024-05-09 09:08:24 +12:00 committed by GitHub
parent 147de75a02
commit 75dc8cccec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,6 +214,7 @@ int32_t ButtonThread::runOnce()
btnEvent = BUTTON_EVENT_NONE;
}
runASAP = false;
return 50;
}
@ -234,6 +235,7 @@ void ButtonThread::attachButtonInterrupts()
BaseType_t higherWake = 0;
mainDelay.interruptFromISR(&higherWake);
ButtonThread::userButton.tick();
runASAP = true;
},
CHANGE);
#endif
@ -280,6 +282,7 @@ void ButtonThread::wakeOnIrq(int irq, int mode)
[] {
BaseType_t higherWake = 0;
mainDelay.interruptFromISR(&higherWake);
runASAP = true;
},
FALLING);
}