2023-09-29 17:37:31 +00:00
|
|
|
#pragma once
|
|
|
|
#include <ESPMegaPRO.h>
|
|
|
|
|
2023-09-29 17:56:25 +00:00
|
|
|
class ESPMega_Timer {
|
2023-09-29 17:37:31 +00:00
|
|
|
public:
|
|
|
|
void loop();
|
2023-09-29 17:56:25 +00:00
|
|
|
ESPMega_Timer(uint8_t hour,uint8_t minute,void(*timer_callback)(), uint32_t fram_address);
|
2023-09-29 17:37:31 +00:00
|
|
|
void set(uint8_t hour,uint8_t minute);
|
2023-09-29 17:56:25 +00:00
|
|
|
void begin();
|
2023-09-29 17:37:31 +00:00
|
|
|
private:
|
|
|
|
uint8_t today;
|
|
|
|
uint8_t timer_ran_today;
|
|
|
|
uint8_t hr;
|
|
|
|
uint8_t min;
|
|
|
|
uint32_t fram_address;
|
|
|
|
void (*timer_callback)();
|
|
|
|
};
|