35 #if (SYS_TIME_NB_TIMER >= SCHAR_MAX)
36 WARNING(
"Too many sys timers (SYS_TIME_NB_TIMER >= SCHAR_MAX). Consider increasing the size of tid_d type (currently int8_t")
float resolution
sys_time_timer resolution in seconds
void sys_time_cancel_timer(tid_t id)
Cancel a system timer by id.
volatile uint32_t nb_tick
SYS_TIME_TICKS since startup.
uint32_t ticks_per_sec
sys_time ticks per second (SYS_TIME_FREQUENCY)
Architecture independent timing functions.
void(* sys_time_cb)(uint8_t id)
uint32_t end_time
in SYS_TIME_TICKS
int8_t tid_t
sys_time timer id type
#define SYS_TIME_FREQUENCY
(Default) sys_time timer frequency in Hz.
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
struct sys_time_timer timer[SYS_TIME_NB_TIMER]
Arch independent mcu ( Micro Controller Unit ) utilities.
static uint32_t sys_time_ticks_of_sec(float seconds)
volatile uint32_t nb_sec
full seconds since startup
#define mcu_int_disable()
void sys_time_update_timer(tid_t id, float duration)
Update the duration until a timer elapses.
#define SYS_TIME_NB_TIMER
uint32_t duration
in SYS_TIME_TICKS
void sys_time_arch_init(void)
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.