Thomas Kolb
8e9124c884
Now any access to the flash, either through update writing or SPIFFS access, is blocked while the LED stripes are written. This is accomplished using a FreeRTOS semaphore.
28 lines
488 B
C++
28 lines
488 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <FreeRTOS.h>
|
|
#include <freertos/semphr.h>
|
|
|
|
#include "ChallengeResponse.h"
|
|
|
|
class UpdateServer
|
|
{
|
|
public:
|
|
enum UpdateTypes {
|
|
UT_FLASH = 0,
|
|
UT_SPIFFS = 1
|
|
};
|
|
|
|
UpdateServer(const std::string &pw, SemaphoreHandle_t *ledLockoutMutex);
|
|
|
|
void start(void);
|
|
|
|
private:
|
|
static void updateTask(void *arg);
|
|
|
|
ChallengeResponse m_cr;
|
|
SemaphoreHandle_t *m_ledLockoutMutex;
|
|
};
|