34 uint16_t
schedule(uint32_t period_ms, std::function<
bool()> callback);
36 bool reset(uint16_t
id, uint32_t period_ms);
41 std::function<bool()> callback;
42 esp_timer_handle_t handle;
46 static void timerCallback(
void* handleVoid);
51 void cancelByIdxLocked(
size_t idx);
52 uint16_t getFreeIdLocked();
54 std::vector<timer_t> m_timers;
55 std::recursive_mutex m_mutex;
56 uint16_t m_id_counter;
Definition: RBControl_timers.hpp:14
bool reset(uint16_t id, uint32_t period_ms)
Definition: RBControl_timers.cpp:71
bool cancel(uint16_t id)
Definition: RBControl_timers.cpp:85
static void deleteFreeRtOsTimerTask()
If you don't plan to use FreeRTOS SW timers, call this to free up 2KB of heap.
Definition: RBControl_timers.cpp:14
uint16_t schedule(uint32_t period_ms, std::function< bool()> callback)
Schedule callback to fire after period (in millisecond).
Definition: RBControl_timers.cpp:45
static Timers & get()
Definition: RBControl_timers.cpp:18
static constexpr uint16_t INVALID_ID
Definition: RBControl_timers.hpp:16
The base namespace. Contains some logging functions, too.
Definition: half_duplex_uart.cpp:53