2024-05-17 14:34:21 -07:00

40 lines
508 B
C++

/*
* OTA.h
*
* Created on: Apr 23, 2019
* Author: miro
*/
#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__ */