34 lines
442 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 */
#include "esp_http_client.h"
class OTA
{
public:
void start();
private:
char otaWriteData[BUFFSIZE + 1] = { 0 };
void httpCleanup(esp_http_client_handle_t client);
private:
void taskFatalError();
public:
OTA();
virtual ~OTA();
};
#endif /* __OTA_H__ */