mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-19 17:27:12 +02:00
Improved ESP8266 support for HMS version (same code base: only ESP32 supports HMS!)
This commit is contained in:
parent
8c67f59eed
commit
27f16c4e91
5 changed files with 39 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue