OS Timer API
Collaboration diagram for OS Timer API:
Macros | |
#define | os_timer_arm(ptimer, ms, repeat_flag) ets_timer_arm(ptimer, ms, repeat_flag) |
#define | os_timer_arm_us(ptimer, us, repeat_flag) ets_timer_arm_us(ptimer, us, repeat_flag) |
#define | os_timer_disarm(ptimer) ets_timer_disarm(ptimer) |
#define | os_timer_setfn(ptimer, pfunction, parg) ets_timer_setfn(ptimer, pfunction, parg) |
Typedefs | |
typedef ETSTimerFunc | os_timer_func_t |
typedef ETSTimer | os_timer_t |
Functions | |
void | os_timer_arm_ticks (os_timer_t *ptimer, uint32_t ticks, bool repeat_flag) |
Set a software timer using the Timer2 tick value. More... | |
Detailed Description
Macro Definition Documentation
◆ os_timer_arm
#define os_timer_arm | ( | ptimer, | |
ms, | |||
repeat_flag | |||
) | ets_timer_arm(ptimer, ms, repeat_flag) |
◆ os_timer_arm_us
#define os_timer_arm_us | ( | ptimer, | |
us, | |||
repeat_flag | |||
) | ets_timer_arm_us(ptimer, us, repeat_flag) |
◆ os_timer_disarm
#define os_timer_disarm | ( | ptimer | ) | ets_timer_disarm(ptimer) |
◆ os_timer_setfn
#define os_timer_setfn | ( | ptimer, | |
pfunction, | |||
parg | |||
) | ets_timer_setfn(ptimer, pfunction, parg) |
Typedef Documentation
◆ os_timer_func_t
typedef ETSTimerFunc os_timer_func_t |
◆ os_timer_t
typedef ETSTimer os_timer_t |
Function Documentation
◆ os_timer_arm_ticks()
void os_timer_arm_ticks | ( | os_timer_t * | ptimer, |
uint32_t | ticks, | ||
bool | repeat_flag | ||
) |
Set a software timer using the Timer2 tick value.
- Parameters
-
ptimer Timer structure ticks Tick count duration for the timer repeat_flag true if timer will automatically repeat
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.