mirror of https://github.com/lumapu/ahoy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
//-----------------------------------------------------------------------------
|
|
// 2023 Ahoy, https://ahoydtu.de
|
|
// Creative Commons - https://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#include "utils/dbg.h"
|
|
#include "app.h"
|
|
|
|
app myApp;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
IRAM_ATTR void handleIntr(void) {
|
|
myApp.handleIntr();
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
#ifdef ESP32
|
|
IRAM_ATTR void handleHmsIntr(void) {
|
|
myApp.handleHmsIntr();
|
|
}
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void setup() {
|
|
myApp.setup();
|
|
|
|
if(myApp.getNrfEnabled()) {
|
|
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
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void loop() {
|
|
myApp.loop();
|
|
}
|
|
|