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")
void sys_time_arch_init(void)
static const float offset[]
Arch independent mcu ( Micro Controller Unit ) utilities.
void sys_time_update_timer(tid_t id, float duration)
Update the duration until a timer elapses.
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
tid_t sys_time_register_timer_offset(tid_t timer, float offset, sys_time_cb cb)
Register a new system timer with an fixed offset from another one.
void sys_time_cancel_timer(tid_t id)
Cancel a system timer by id.
Architecture independent timing functions.
volatile uint32_t nb_tick
SYS_TIME_TICKS since startup.
uint32_t ticks_per_sec
sys_time ticks per second (SYS_TIME_FREQUENCY)
#define SYS_TIME_FREQUENCY
(Default) sys_time timer frequency in Hz.
static uint32_t sys_time_ticks_of_sec(float seconds)
volatile uint32_t nb_sec
full seconds since startup
void(* sys_time_cb)(uint8_t id)
uint32_t duration
in SYS_TIME_TICKS
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
float resolution
sys_time_timer resolution in seconds
#define SYS_TIME_NB_TIMER
uint32_t end_time
in SYS_TIME_TICKS
struct sys_time_timer timer[SYS_TIME_NB_TIMER]
int8_t tid_t
sys_time timer id type
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.