nico@207: nico@207:
nico@215:#include <applicfg.h>
#include "timer.h"
nico@215: Include dependency graph for timer.c:
nico@207: Go to the source code of this file.
Defines | |
#define | min_val(a, b) ((a<b)?a:b) |
Functions | |
TIMER_HANDLE | SetAlarm (CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period) |
TIMER_HANDLE | DelAlarm (TIMER_HANDLE handle) |
void | TimeDispatch () |
Variables | |
s_timer_entry | timers [MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},} |
TIMEVAL | total_sleep_time = TIMEVAL_MAX |
TIMER_HANDLE | last_timer_raw = -1 |
nico@210: Definition in file timer.c.
#define min_val | nico@207:( | nico@207:a, | |||
nico@207: | nico@207: | b | nico@207:nico@207: | ) | nico@207:((a<b)?a:b) | nico@207:
nico@207: nico@207:
nico@210: Definition at line 44 of file timer.c. nico@210:
nico@210: Referenced by TimeDispatch(). nico@207:
nico@207:
TIMER_HANDLE DelAlarm | nico@207:( | nico@207:TIMER_HANDLE | nico@207:handle | nico@207:) | nico@207:nico@207: |
nico@210: ----- Use this to remove an alarm ----
nico@210:
handle |
nico@210: Definition at line 112 of file timer.c. nico@210:
nico@215: References last_timer_raw, MSG_WAR, struct_s_timer_entry::state, and timers. nico@210:
etisserant@240: Referenced by _sendPDOevent(), heartbeatStop(), PDOStop(), proceedNODE_GUARD(), proceedPDO(), ProducerHearbeatAlarm(), stopSYNC(), and TPDO_Communication_Parameter_Callback(). etisserant@240:
TIMER_HANDLE SetAlarm | nico@207:( | nico@215:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS32 | nico@207:id, | nico@207:|
nico@207: | etisserant@240: | TimerCallback_t | nico@207:callback, | nico@207:|
nico@207: | nico@207: | TIMEVAL | nico@207:value, | nico@207:|
nico@207: | nico@207: | TIMEVAL | nico@207:period | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210: ------- Use this to declare a new alarm ------
nico@210:
d | ||
id | ||
callback | ||
value | ||
period |
nico@210: Definition at line 57 of file timer.c. nico@210:
nico@215: References struct_s_timer_entry::d, last_timer_raw, MAX_NB_TIMER, TIMER_HANDLE, and timers. nico@215:
etisserant@240: Referenced by _sendPDOevent(), heartbeatInit(), proceedNODE_GUARD(), startSYNC(), and StartTimerLoop(). etisserant@240:
void TimeDispatch | nico@207:( | nico@215:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@210: ------ TimeDispatch is called on each timer expiration ---- nico@210:
nico@210: Definition at line 131 of file timer.c. nico@210:
nico@215: References getElapsedTime(), last_timer_raw, min_val, TIMER_HANDLE, timers, TIMEVAL, TIMEVAL_MAX, and total_sleep_time. nico@215:
nico@215: Referenced by class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc(). nico@215:
etisserant@240: Here is the call graph for this function:
nico@207:
TIMER_HANDLE last_timer_raw = -1 | nico@207:
nico@207: nico@207:
nico@210: Definition at line 42 of file timer.c. nico@210:
nico@210: Referenced by DelAlarm(), SetAlarm(), and TimeDispatch(). nico@207:
etisserant@240: etisserant@240:
s_timer_entry timers[MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},} | nico@207:
nico@207: nico@207:
nico@210: Definition at line 39 of file timer.c. nico@210:
nico@210: Referenced by DelAlarm(), SetAlarm(), and TimeDispatch(). nico@207:
etisserant@240: etisserant@240:
TIMEVAL total_sleep_time = TIMEVAL_MAX | nico@207:
nico@207: nico@207:
nico@210: Definition at line 41 of file timer.c. nico@210:
nico@210: Referenced by TimeDispatch(). nico@210:
etisserant@240: