32 #ifndef SYS_TIME_ARCH_H
33 #define SYS_TIME_ARCH_H
37 #include <libopencm3/stm32/gpio.h>
38 #include <libopencm3/stm32/rcc.h>
39 #include <libopencm3/cm3/systick.h>
86 uint32_t start = systick_get_value();
100 end = systick_get_reload() - rem + start;
104 while (!systick_get_countflag());
108 while (systick_get_value() > end);
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
uint32_t get_sys_time_usec100(void)
Get the time in microseconds divided by 100 since startup.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
Architecture independent timing functions.
static uint32_t msec_of_cpu_ticks(uint32_t cpu_ticks)
volatile uint32_t nb_sec
full seconds since startup
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
static uint32_t cpu_ticks_of_usec(uint32_t usec)
static uint32_t usec_of_cpu_ticks(uint32_t cpu_ticks)
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.