Collaboration diagram for OS Timer API:

Classes

struct  smg_timer_t
 

Macros

#define os_timer_func_t   smg_timer_func_t
 
#define os_timer_t   smg_timer_t
 
#define os_timer_arm   smg_timer_arm
 
#define os_timer_arm_us   smg_timer_arm_us
 
#define os_timer_disarm   smg_timer_disarm
 
#define os_timer_setfn   smg_timer_setfn
 
#define os_timer_arm_ticks   smg_timer_arm_ticks
 
#define os_timer_expire   smg_timer_expire
 
#define os_timer_done   smg_timer_done
 

Typedefs

using smg_timer_func_t = void(*)(void *arg)
 

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...
 
static bool os_timer_is_armed (const os_timer_t *ptimer)
 
static uint64_t os_timer_expire (const os_timer_t *ptimer)
 
static void os_timer_done (os_timer_t *ptimer)
 
void smg_timer_arm_ticks (os_timer_t *ptimer, uint32_t ticks, bool repeat_flag)
 Set a software timer using the Timer2 tick value. More...
 
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 uint64_t smg_timer_expire (const os_timer_t *ptimer)
 

Detailed Description

Macro Definition Documentation

◆ os_timer_arm

#define os_timer_arm   smg_timer_arm

◆ os_timer_arm_ticks

#define os_timer_arm_ticks   smg_timer_arm_ticks

◆ os_timer_arm_us

#define os_timer_arm_us   smg_timer_arm_us

◆ os_timer_disarm

#define os_timer_disarm   smg_timer_disarm

◆ os_timer_done

#define os_timer_done   smg_timer_done

◆ os_timer_expire

#define os_timer_expire   smg_timer_expire

◆ os_timer_func_t

#define os_timer_func_t   smg_timer_func_t

◆ os_timer_setfn

#define os_timer_setfn   smg_timer_setfn

◆ os_timer_t

#define os_timer_t   smg_timer_t

Typedef Documentation

◆ smg_timer_func_t

using smg_timer_func_t = void (*)(void* arg)

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
ptimerTimer structure
ticksTick count duration for the timer
repeat_flagtrue 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.

◆ os_timer_done()

static void os_timer_done ( os_timer_t ptimer)
inlinestatic

◆ os_timer_expire()

static uint64_t os_timer_expire ( const os_timer_t ptimer)
inlinestatic

◆ os_timer_is_armed()

static bool os_timer_is_armed ( const os_timer_t ptimer)
inlinestatic

◆ smg_timer_arm()

void smg_timer_arm ( os_timer_t ptimer,
uint32_t  time_ms,
bool  repeat_flag 
)

◆ smg_timer_arm_ticks()

void smg_timer_arm_ticks ( os_timer_t ptimer,
uint32_t  ticks,
bool  repeat_flag 
)

Set a software timer using the Timer2 tick value.

Parameters
ptimerTimer structure
ticksTick count duration for the timer
repeat_flagtrue 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.

◆ smg_timer_arm_us()

void smg_timer_arm_us ( os_timer_t ptimer,
uint32_t  time_us,
bool  repeat_flag 
)

◆ smg_timer_disarm()

void smg_timer_disarm ( os_timer_t ptimer)

◆ smg_timer_done()

void smg_timer_done ( os_timer_t ptimer)

◆ smg_timer_expire()

static uint64_t smg_timer_expire ( const os_timer_t ptimer)
inlinestatic

◆ smg_timer_setfn()

void smg_timer_setfn ( os_timer_t ptimer,
os_timer_func_t  pfunction,
void *  parg 
)