mirror of https://github.com/lumapu/ahoy.git
33 lines
724 B
33 lines
724 B
|
|
#include "Arduino.h"
|
|
|
|
#include <ESP8266WiFi.h>
|
|
#include <DNSServer.h>
|
|
#include <ESP8266WebServer.h>
|
|
#include <Ticker.h>
|
|
|
|
#include <ESP8266HTTPUpdateServer.h>
|
|
#include "app.h"
|
|
#include "config.h"
|
|
|
|
app myApp;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void setup() {
|
|
myApp.setup(WIFI_TRY_CONNECT_TIME);
|
|
|
|
// TODO: move to HmRadio
|
|
attachInterrupt(digitalPinToInterrupt(myApp.getIrqPin()), handleIntr, FALLING);
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void loop() {
|
|
myApp.loop();
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
ICACHE_RAM_ATTR void handleIntr(void) {
|
|
myApp.handleIntr();
|
|
}
|
|
|