mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-20 01:37:11 +02:00
improved general structures to support HMS in future
This commit is contained in:
parent
c56c785a1f
commit
c4dd372554
14 changed files with 96 additions and 77 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -1,12 +1,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2022 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// 2023 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "utils/dbg.h"
|
||||
#include "app.h"
|
||||
#include "config/config.h"
|
||||
|
||||
|
||||
app myApp;
|
||||
|
||||
|
@ -20,13 +18,14 @@ IRAM_ATTR void handleHmsIntr(void) {
|
|||
myApp.handleHmsIntr();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void setup() {
|
||||
myApp.setup();
|
||||
|
||||
attachInterrupt(digitalPinToInterrupt(myApp.getIrqPin()), handleIntr, FALLING);
|
||||
attachInterrupt(digitalPinToInterrupt(myApp.getHmsIrqPin()), handleHmsIntr, RISING);
|
||||
if(myApp.getNrfEnabled())
|
||||
attachInterrupt(digitalPinToInterrupt(myApp.getNrfIrqPin()), handleIntr, FALLING);
|
||||
if(myApp.getCmtEnabled())
|
||||
attachInterrupt(digitalPinToInterrupt(myApp.getCmtIrqPin()), handleHmsIntr, RISING);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue