Loading files
2cb77771fThis file is pinned to the selected release. Download the original to open it in your design tool.
#pragma once
#include <cstddef>
#include <cstdint>
namespace Espfc::Connect {
enum LedType
{
LED_SIMPLE,
LED_STRIP,
};
enum LedStatus
{
LED_OFF,
LED_OK,
LED_ERROR,
LED_ON,
};
class StatusLed
{
public:
StatusLed();
void begin(int8_t pin, uint8_t type, uint8_t invert);
void update();
void setStatus(LedStatus newStatus, bool force = false);
private:
void _write(uint8_t val);
int8_t _pin;
uint8_t _type;
uint8_t _invert;
LedStatus _status;
uint32_t _next;
bool _state;
size_t _step;
int* _pattern;
};
} // namespace Espfc::Connect