2019-11-27 00:22:04 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2023-07-28 20:33:01 +02:00
|
|
|
#include <freertos/FreeRTOS.h>
|
2019-12-15 18:03:23 +01:00
|
|
|
#include <freertos/semphr.h>
|
|
|
|
|
2019-11-27 00:22:04 +01:00
|
|
|
#include "ChallengeResponse.h"
|
|
|
|
|
|
|
|
class UpdateServer
|
|
|
|
{
|
|
|
|
public:
|
2019-12-02 21:21:13 +01:00
|
|
|
enum UpdateTypes {
|
|
|
|
UT_FLASH = 0,
|
|
|
|
UT_SPIFFS = 1
|
|
|
|
};
|
|
|
|
|
2019-12-15 18:03:23 +01:00
|
|
|
UpdateServer(const std::string &pw, SemaphoreHandle_t *ledLockoutMutex);
|
2019-11-27 00:22:04 +01:00
|
|
|
|
|
|
|
void start(void);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void updateTask(void *arg);
|
|
|
|
|
|
|
|
ChallengeResponse m_cr;
|
2019-12-15 18:03:23 +01:00
|
|
|
SemaphoreHandle_t *m_ledLockoutMutex;
|
2019-12-02 21:21:13 +01:00
|
|
|
};
|