|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
35 #include "mcu_periph/sys_time_arch.h"
58 chThdCreateStatic(wa_thd_sys_tick,
sizeof(wa_thd_sys_tick),
70 chMtxLock(&sys_time_mtx);
74 chMtxUnlock(&sys_time_mtx);
80 chMtxLock(&sys_time_mtx);
84 chMtxUnlock(&sys_time_mtx);
100 chSysPolledDelayX(US2RTC(STM32_HCLK, us));
104 chThdSleep((systime_t)wait_st);
111 chThdSleep((systime_t)wait_st);
116 chThdSleep(TIME_S2I(
s));
125 chRegSetThreadName(
"sys_tick_handler");
129 chThdSleepMilliseconds(1);
135 chMtxLock(&sys_time_mtx);
160 chMtxUnlock(&sys_time_mtx);
uint32_t cpu_ticks_per_sec
cpu ticks per second
struct sys_time_timer timer[SYS_TIME_NB_TIMER]
void sys_time_ssleep(uint8_t s)
static MUTEX_DECL(sys_time_mtx)
static void thd_sys_tick(void *arg)
uint32_t resolution_cpu_ticks
sys_time_timer resolution in cpu ticks
uint32_t duration
in SYS_TIME_TICKS
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
static THD_WORKING_AREA(wa_thd_sys_tick, 1024)
#define CH_CFG_ST_FREQUENCY
System tick frequency.
void sys_time_msleep(uint16_t ms)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
volatile uint32_t nb_tick
SYS_TIME_TICKS since startup.
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
arch independent LED (Light Emitting Diodes) API
void sys_time_arch_init(void)
#define SYS_TIME_NB_TIMER
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
uint32_t end_time
in SYS_TIME_TICKS
static uint32_t usec_of_sys_time_ticks(uint32_t ticks)
volatile uint32_t nb_sec
full seconds since startup
static void sys_tick_handler(void)
static uint32_t sys_time_ticks_of_sec(float seconds)
static uint32_t msec_of_sys_time_ticks(uint32_t ticks)
float resolution
sys_time_timer resolution in seconds
unsigned long long uint64_t