|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Architecture independent timing functions. More...
Include dependency graph for sys_time.c:Go to the source code of this file.
Functions | |
| tid_t | sys_time_register_timer (float duration, sys_time_cb cb) |
| Register a new system timer. | |
| tid_t | sys_time_register_timer_offset (tid_t timer, float offset, sys_time_cb cb) |
| Register a new system timer with an fixed offset from another one. | |
| void | sys_time_cancel_timer (tid_t id) |
| Cancel a system timer by id. | |
| void | sys_time_update_timer (tid_t id, float duration) |
| Update the duration until a timer elapses. | |
| void | sys_time_init (void) |
Variables | |
| struct sys_time | sys_time |
Architecture independent timing functions.
Definition in file sys_time.c.
Cancel a system timer by id.
| id | Timer id. |
Definition at line 76 of file sys_time.c.
References sys_time_timer::cb, sys_time_timer::duration, sys_time_timer::elapsed, sys_time_timer::end_time, foo, sys_time_timer::in_use, and sys_time::timer.
Referenced by mavlink_mission_cancel_timer(), and px4flash_event().
Here is the caller graph for this function:Definition at line 119 of file sys_time.c.
References sys_time_timer::cb, sys_time_timer::duration, sys_time_timer::elapsed, sys_time_timer::end_time, foo, sys_time_timer::in_use, sys_time::nb_sec, sys_time::nb_sec_rem, sys_time::nb_tick, sys_time::resolution, shell_add_entry(), sys_time_arch_init(), SYS_TIME_FREQUENCY, SYS_TIME_NB_TIMER, sys_time::ticks_per_sec, and sys_time::timer.
Referenced by main(), and mcu_init().
Here is the call graph for this function:
Here is the caller graph for this function:| tid_t sys_time_register_timer | ( | float | duration, |
| sys_time_cb | cb | ||
| ) |
Register a new system timer.
| duration | Duration in seconds until the timer elapses. |
| cb | Callback function that is called from the ISR when timer elapses, or NULL |
Definition at line 43 of file sys_time.c.
References sys_time_timer::cb, sys_time_timer::duration, sys_time_timer::elapsed, sys_time_timer::end_time, sys_time_timer::in_use, sys_time::nb_tick, start_time, SYS_TIME_NB_TIMER, sys_time_ticks_of_sec(), and sys_time::timer.
Referenced by intermcu_init(), main(), main_ap_init(), main_fbw_init(), main_init(), main_init(), main_init(), main_init(), main_init(), main_init(), main_init(), main_recovery_init(), mavlink_mission_set_timer(), and px4flash_init().
Here is the call graph for this function:
Here is the caller graph for this function:| tid_t sys_time_register_timer_offset | ( | tid_t | timer, |
| float | offset, | ||
| sys_time_cb | cb | ||
| ) |
Register a new system timer with an fixed offset from another one.
| timer | timer providing start time and duration |
| offset | offset in seconds beetween the timers (will overlap if longer than duration) |
| cb | Callback function that is called from the ISR when timer elapses, or NULL |
Definition at line 59 of file sys_time.c.
References sys_time_timer::cb, sys_time_timer::duration, sys_time_timer::elapsed, sys_time_timer::end_time, sys_time_timer::in_use, offset, SYS_TIME_NB_TIMER, sys_time_ticks_of_sec(), and sys_time::timer.
Referenced by main_ap_init().
Here is the call graph for this function:
Here is the caller graph for this function:Update the duration until a timer elapses.
| id | Timer id |
| duration | Duration in seconds until the timer elapses. |
Definition at line 86 of file sys_time.c.
References sys_time_timer::duration, sys_time_timer::end_time, sys_time_ticks_of_sec(), and sys_time::timer.
Referenced by mavlink_mission_set_timer().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 41 of file sys_time.c.