Improved ESP8266 support for HMS version (same code base: only ESP32 supports HMS!)

This commit is contained in:
lumapu 2023-04-25 20:37:43 +02:00
parent 8c67f59eed
commit 27f16c4e91
5 changed files with 39 additions and 19 deletions

View file

@ -14,9 +14,11 @@ IRAM_ATTR void handleIntr(void) {
}
//-----------------------------------------------------------------------------
#ifdef ESP32
IRAM_ATTR void handleHmsIntr(void) {
myApp.handleHmsIntr();
}
#endif
//-----------------------------------------------------------------------------
void setup() {
@ -26,10 +28,12 @@ void setup() {
if(DEF_PIN_OFF != myApp.getNrfIrqPin())
attachInterrupt(digitalPinToInterrupt(myApp.getNrfIrqPin()), handleIntr, FALLING);
}
#ifdef ESP32
if(myApp.getCmtEnabled()) {
if(DEF_PIN_OFF != myApp.getCmtIrqPin())
attachInterrupt(digitalPinToInterrupt(myApp.getCmtIrqPin()), handleHmsIntr, RISING);
}
#endif
}