Go to the documentation of this file.
17 #include "esp_systemapi.h"
20 #include <driver/os_timer.h>
67 int remain = expiry - Clock::ticks();
68 return (remain > 0) ? remain : 0;
84 this->interval = interval;
92 __forceinline
void IRAM_ATTR
arm(
bool repeating)
97 __forceinline
void IRAM_ATTR
disarm()
void(*)(void *arg) TimerCallback
Interrupt-compatible C callback function pointer.
Definition: CallbackTimer.h:23
void arm(bool repeating)
Definition: SimpleTimer.h:92
void os_timer_setfn(os_timer_t *ptimer, os_timer_func_t *pfunction, void *parg)
void os_timer_disarm(os_timer_t *ptimer)
TickType getInterval() const
Definition: SimpleTimer.h:87
static constexpr TickType maxTicks()
Definition: SimpleTimer.h:50
bool isArmed() const
Definition: SimpleTimer.h:55
~OsTimerApi()
Definition: SimpleTimer.h:71
This is the structure used by the Espressif timer API.
Definition: Rp2040/Components/driver/include/driver/os_timer.h:28
uint32_t TimeType
Definition: SimpleTimer.h:37
void setInterval(TickType interval)
Definition: SimpleTimer.h:82
void os_timer_done(os_timer_t *ptimer)
OsTimerClock Clock
Definition: SimpleTimer.h:35
void disarm()
Definition: SimpleTimer.h:97
#define os_timer_arm_ticks
Definition: Esp32/Components/driver/include/driver/os_timer.h:52
Implements common system callback timer API.
Definition: SimpleTimer.h:32
#define OS_TIMER_DEFAULT()
Definition: Esp8266/Components/driver/include/driver/os_timer.h:20
#define os_timer_expire
Definition: Esp32/Components/driver/include/driver/os_timer.h:53
static constexpr const char * typeName()
Definition: SimpleTimer.h:39
void setCallback(TimerCallback callback, void *arg)
Definition: SimpleTimer.h:77
uint32_t TickType
Definition: SimpleTimer.h:36
Callback timer API class template.
Definition: CallbackTimer.h:30
TickType ticks() const
Definition: SimpleTimer.h:60
static constexpr TickType minTicks()
Definition: SimpleTimer.h:44