OS Timer
Driver for software timer queues
-
using smg_timer_func_t = void (*)(void *arg)
-
void smg_timer_arm_ticks(os_timer_t *ptimer, uint32_t ticks, bool repeat_flag)
Set a software timer using the Timer2 tick value.
This function has been added to Sming for more efficient and flexible use of software timers. It can be used alongside the SDK
os_timer_arm_new()
function.- Parameters:
ptimer – Timer structure
ticks – Tick count duration for the timer
repeat_flag – true if timer will automatically repeat
-
void smg_timer_setfn(os_timer_t *ptimer, os_timer_func_t pfunction, void *parg)
-
void smg_timer_arm_us(os_timer_t *ptimer, uint32_t time_us, bool repeat_flag)
-
void smg_timer_arm(os_timer_t *ptimer, uint32_t time_ms, bool repeat_flag)
-
void smg_timer_disarm(os_timer_t *ptimer)
-
void smg_timer_done(os_timer_t *ptimer)
-
static inline uint64_t smg_timer_expire(const os_timer_t *ptimer)
-
void os_timer_arm_ticks(os_timer_t *ptimer, uint32_t ticks, bool repeat_flag)
Set a software timer using the Timer2 tick value.
This function has been added to Sming for more efficient and flexible use of software timers. It can be used alongside the SDK
os_timer_arm_new()
function.- Parameters:
ptimer – Timer structure
ticks – Tick count duration for the timer
repeat_flag – true if timer will automatically repeat
-
static inline bool os_timer_is_armed(const os_timer_t *ptimer)
-
static inline uint64_t os_timer_expire(const os_timer_t *ptimer)
-
static inline void os_timer_done(os_timer_t *ptimer)
-
os_timer_func_t
-
os_timer_t
-
os_timer_arm
-
os_timer_arm_us
-
os_timer_disarm
-
os_timer_setfn
-
os_timer_arm_ticks
-
os_timer_expire
-
os_timer_done
-
struct smg_timer_t
- #include <os_timer.h>