2024-05-20 17:50:13 -07:00

40 lines
517 B
C++

///
/// © MiroZ 2024
///
/// Created on: Apr 23, 2019
/// Modified: 2024
///
#ifndef __OTA_H__
#define __OTA_H__
#define BUFFSIZE 1024
#define HASH_LEN 32 /* SHA-256 digest length */
namespace ota_update
{
#include "App.h"
#include "esp_http_client.h"
class OTA
{
public:
void start();
private:
char otaWriteData[BUFFSIZE + 1] = { 0 };
void httpCleanup(esp_http_client_handle_t client);
App & m_app;
private:
void taskFatalError();
public:
OTA(App & app);
virtual ~OTA();
};
}
#endif /* __OTA_H__ */