 |
Paparazzi UAS
v6.1.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"
61 chThdCreateStatic(wa_thd_sys_tick,
sizeof(wa_thd_sys_tick),
73 chMtxLock(&sys_time_mtx);
74 uint32_t current = chSysGetRealtimeCounterX();
78 chMtxUnlock(&sys_time_mtx);
84 chMtxLock(&sys_time_mtx);
85 uint32_t current = chSysGetRealtimeCounterX();
89 chMtxUnlock(&sys_time_mtx);
105 chSysPolledDelayX(US2RTC(STM32_HCLK, us));
108 chThdSleepMicroseconds(us);
114 chThdSleepMilliseconds(ms);
119 chThdSleepSeconds(
s);
129 chRegSetThreadName(
"sys_tick_handler");
132 systime_t t = chVTGetSystemTime();
140 chMtxLock(&sys_time_mtx);
169 chMtxUnlock(&sys_time_mtx);
uint32_t cpu_ticks_per_sec
cpu ticks per second
struct sys_time_timer timer[SYS_TIME_NB_TIMER]
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
void sys_time_ssleep(uint8_t s)
static MUTEX_DECL(sys_time_mtx)
static uint32_t cpu_ticks_of_sec(float seconds)
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)
static uint32_t cpu_counter
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.
static uint32_t cpu_ticks
arch independent LED (Light Emitting Diodes) API
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
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
#define SYS_TIME_FREQUENCY
(Default) sys_time timer frequency in Hz.
volatile uint32_t nb_sec
full seconds since startup
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
static void sys_tick_handler(void)
float resolution
sys_time_timer resolution in seconds