Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Implementation of system time functions for ChibiOS arch. More...
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) |
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.
uint32_t get_sys_time_msec | ( | void | ) |
Get the time in milliseconds since startup.
Definition at line 78 of file sys_time_arch.c.
Referenced by ak8975_event(), ak8975_read(), gps_piksi_event(), hackhd_command(), hackhd_periodic(), mavlink_send_attitude(), mavlink_send_attitude_quaternion(), mavlink_send_global_position_int(), mavlink_send_local_position_ned(), mavlink_send_rc_channels(), mavlink_send_system_time(), periodic_2Hz_openlog(), sbp_pos_ecef_callback(), send_bluegiga(), send_downlink(), send_gps_dw1000_small(), spb_heartbeat_callback(), tunnel_event(), and wind_estimator_periodic().
uint32_t get_sys_time_usec | ( | void | ) |
Get the time in microseconds since startup.
WARNING: overflows after 70min!
Definition at line 68 of file sys_time_arch.c.
Referenced by ahrs_aligner_run(), ahrs_gx3_publish_imu(), ahrs_vectornav_event(), gps_cb(), gps_feed_value(), gps_mtk_msg(), gps_piksi_publish(), gps_sim_hitl_event(), gps_sim_publish(), gps_sirf_msg(), gps_skytraq_msg(), gps_ubx_msg(), gps_udp_parse(), handle_ins_msg(), hott_periodic_event(), imu_analog_periodic(), imu_apogee_event(), imu_aspirin2_event(), imu_aspirin_event(), imu_aspirin_i2c_event(), imu_b2_event(), imu_bebop_event(), imu_disco_event(), imu_drotek2_event(), imu_gl1_event(), imu_hbmini_event(), imu_krooz_event(), imu_krooz_periodic(), imu_mpu9250_event(), imu_mpu_hmc_event(), imu_mpu_i2c_event(), imu_mpu_spi_event(), imu_navgo_event(), imu_navstik_event(), imu_nps_event(), imu_ppzuav_event(), imu_px4_event(), imu_px4fmu_event(), imu_swing_event(), imu_um6_publish(), imu_umarim_event(), ins_alt_float_update_baro(), ins_alt_float_update_gps(), intermcu_parse_msg(), mag_hmc58xx_module_event(), mag_pitot_parse_msg(), main(), mavlink_send_gps_raw_int(), navdata_publish_imu(), nmea_gps_msg(), opticflow_module_run(), parse_gps_datalink(), parse_gps_datalink_small(), pose_periodic(), pprzlog_tp_init(), send_filter_status(), send_gps_dw1000_small(), stereocam_parse_msg(), superbitrf_event(), superbitrf_receive_packet_cb(), and v4l2_capture_thread().
|
static |
|
static |
Definition at line 126 of file sys_time_arch.c.
References sys_time_timer::cb, CH_CFG_ST_FREQUENCY, sys_time_timer::duration, sys_time_timer::elapsed, sys_time_timer::end_time, sys_time_timer::in_use, LED_TOGGLE, sys_time::nb_sec, sys_time::nb_sec_rem, sys_time::nb_tick, SYS_TIME_NB_TIMER, sys_time_ticks_of_sec(), sys_time::timer, and TRUE.
Referenced by nps_autopilot_run_systime_step(), sim_sys_time_task(), and thd_sys_tick().
void sys_time_arch_init | ( | void | ) |
Definition at line 49 of file sys_time_arch.c.
Referenced by sys_time_init().
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 | ) |
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().
|
static |
Definition at line 115 of file sys_time_arch.c.
References sys_tick_handler(), and TRUE.
Referenced by sys_time_arch_init().
|
static |