Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sys_time_arch.c File Reference

Implementation of system time functions for ChibiOS arch. More...

#include "mcu_periph/sys_time_arch.h"
#include <BOARD_CONFIG>
#include <ch.h>
#include "led.h"
+ Include dependency graph for sys_time_arch.c:

Go to the source code of this file.

Functions

static MUTEX_DECL (sys_time_mtx)
 
static void thd_sys_tick (void *arg)
 
static THD_WORKING_AREA (wa_thd_sys_tick, 1024)
 
static void sys_tick_handler (void)
 
void sys_time_arch_init (void)
 
uint32_t get_sys_time_usec (void)
 Get the time in microseconds since startup. More...
 
uint32_t get_sys_time_msec (void)
 Get the time in milliseconds since startup. More...
 
void sys_time_usleep (uint32_t us)
 sys_time_usleep(uint32_t us) More...
 
void sys_time_msleep (uint16_t ms)
 
void sys_time_ssleep (uint8_t s)
 

Detailed Description

Implementation of system time functions for ChibiOS arch.

Mostly empty functions for Paparazzi compatibility, since ChibiOS uses different system time functions.

Definition in file sys_time_arch.c.

Function Documentation

static MUTEX_DECL ( sys_time_mtx  )
static
static void sys_tick_handler ( void  )
static
void sys_time_arch_init ( void  )

Definition at line 49 of file sys_time_arch.c.

Referenced by sys_time_init().

+ Here is the caller graph for this function:

void sys_time_msleep ( uint16_t  ms)

Definition at line 101 of file sys_time_arch.c.

References CH_CFG_ST_FREQUENCY.

void sys_time_ssleep ( uint8_t  s)

Definition at line 107 of file sys_time_arch.c.

void sys_time_usleep ( uint32_t  us)

sys_time_usleep(uint32_t us)

using intermediate 64 bits variable to avoid wrapping

max sleep time is around 10 days (2^32 / CH_CFG_ST_FREQUENCY) at 10kHz

Definition at line 95 of file sys_time_arch.c.

References CH_CFG_ST_FREQUENCY.

Referenced by cyrf6936_init(), main(), pcap01_init(), px4flash_event(), radio_control_spektrum_try_bind(), received_spektrum_soft_bind(), send_spektrum_bind(), VCOM_putchar(), w5100_init(), and xbee_dl_init().

+ Here is the caller graph for this function:

static void thd_sys_tick ( void *  arg)
static

Definition at line 115 of file sys_time_arch.c.

References sys_tick_handler(), and TRUE.

Referenced by sys_time_arch_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static THD_WORKING_AREA ( wa_thd_sys_tick  ,
1024   
)
static