OTA Solution - Build your own OTA platform (2/2, ESP32 OTA Application)

This commit is contained in:
Eric
2021-07-31 14:41:35 -07:00
parent 5c79489642
commit d5ebb9a165
16 changed files with 940 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "ButtonCont.h"
#define RIGHT_BUTTON_PIN 35
static ButtonCont* instance = NULL;
void released(Button2& btn) {
instance->released_cb();
}
ButtonCont::ButtonCont() {}
ButtonCont::ButtonCont(FuncPtrVoid f) {
instance = this;
button = new Button2(RIGHT_BUTTON_PIN);
button->setReleasedHandler(released);
released_cb = f;
}
ButtonCont::~ButtonCont() {
delete button;
}
void ButtonCont::loop() {
button->loop();
}