ahoy/tools/esp8266/esp8266.cpp
2022-08-13 01:07:59 +02:00

34 lines
936 B
C++

//-----------------------------------------------------------------------------
// 2022 Ahoy, https://www.mikrocontroller.net/topic/525778
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
//-----------------------------------------------------------------------------
#include "dbg.h"
#include "app.h"
#include "config.h"
#include "web.h"
app myApp;
web *mWebInst;
//-----------------------------------------------------------------------------
IRAM_ATTR void handleIntr(void) {
myApp.handleIntr();
}
//-----------------------------------------------------------------------------
void setup() {
myApp.setup(WIFI_TRY_CONNECT_TIME);
mWebInst = new web(&myApp);
// TODO: move to HmRadio
attachInterrupt(digitalPinToInterrupt(myApp.getIrqPin()), handleIntr, FALLING);
}
//-----------------------------------------------------------------------------
void loop() {
myApp.loop();
}