This commit is contained in:
iranl
2024-05-11 13:50:54 +02:00
parent 29d57dd621
commit f6d2eda3cb
51 changed files with 98 additions and 6 deletions

20
src/Ota.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include <stdint.h>
#include <cstddef>
#include "esp_ota_ops.h"
class Ota
{
public:
void updateFirmware(uint8_t* buf, size_t size);
bool updateStarted();
bool updateCompleted();
void restart();
private:
bool _updateStarted = false;
bool _updateCompleted = false;
esp_ota_handle_t otaHandler = 0;
};