nico@207: nico@207:
nico@207:#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>
#include <native/mutex.h>
#include <native/alarm.h>
#include "applicfg.h"
#include "can_driver.h"
#include "timer.h"
nico@207: Go to the source code of this file.
Defines | |
#define | TIMERLOOP_TASK_CREATED 1 |
Functions | |
void | cleanup_all (void) |
void | StopTimerLoop (void) |
void | EnterMutex (void) |
void | LeaveMutex (void) |
void | timerloop_task_proc (void *arg) |
void | StartTimerLoop (TimerCallback_t init_callback) |
void | CreateReceiveTask (CAN_PORT fd0, TASK_HANDLE *ReceiveLoop_task, void *ReceiveLoop_task_proc) |
void | WaitReceiveTaskEnd (TASK_HANDLE *Thread) |
void | setTimer (TIMEVAL value) |
TIMEVAL | getElapsedTime (void) |
Variables | |
RT_MUTEX | CanFestival_mutex |
RT_TASK | timerloop_task |
RTIME | last_time_read |
RTIME | last_occured_alarm |
RTIME | last_alarm_set |
char | stop_timer = 0 |
#define TIMERLOOP_TASK_CREATED 1 | nico@207:
nico@207: nico@207:
nico@207: Definition at line 14 of file timers_xeno.c. nico@207:
nico@207:
void cleanup_all | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 24 of file timers_xeno.c. nico@207:
nico@207: References timerloop_task. nico@207:
void CreateReceiveTask | nico@207:( | nico@207:CAN_PORT | nico@207:fd0, | nico@207:|
nico@207: | nico@207: | TASK_HANDLE * | nico@207:ReceiveLoop_task, | nico@207:|
nico@207: | nico@207: | void * | nico@207:ReceiveLoop_task_proc | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 93 of file timers_xeno.c. nico@207:
void EnterMutex | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 35 of file timers_xeno.c. nico@207:
nico@207: References CanFestival_mutex. nico@207:
TIMEVAL getElapsedTime | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 128 of file timers_xeno.c. nico@207:
nico@207: References last_occured_alarm, and last_time_read. nico@207:
void LeaveMutex | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 40 of file timers_xeno.c. nico@207:
nico@207: References CanFestival_mutex. nico@207:
void setTimer | nico@207:( | nico@207:TIMEVAL | nico@207:value | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 122 of file timers_xeno.c. nico@207:
nico@207: References last_alarm_set, last_time_read, timerloop_task, and TIMEVAL_MAX. nico@207:
void StartTimerLoop | nico@207:( | nico@207:TimerCallback_t | nico@207:init_callback | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 60 of file timers_xeno.c. nico@207:
nico@207: References cleanup_all(), getElapsedTime(), last_alarm_set, last_occured_alarm, last_time_read, SetAlarm(), stop_timer, timerloop_task, and timerloop_task_proc(). nico@207:
void StopTimerLoop | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 28 of file timers_xeno.c. nico@207:
nico@207: References stop_timer, and timerloop_task. nico@207:
void timerloop_task_proc | nico@207:( | nico@207:void * | nico@207:arg | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 45 of file timers_xeno.c. nico@207:
nico@207: References EnterMutex(), last_alarm_set, last_occured_alarm, LeaveMutex(), stop_timer, and TimeDispatch(). nico@207:
void WaitReceiveTaskEnd | nico@207:( | nico@207:TASK_HANDLE * | nico@207:Thread | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 117 of file timers_xeno.c. nico@207:
nico@207:
RT_MUTEX CanFestival_mutex | nico@207:
nico@207: nico@207:
nico@207: Definition at line 16 of file timers_xeno.c. nico@207:
RTIME last_alarm_set | nico@207:
nico@207: nico@207:
nico@207: Definition at line 20 of file timers_xeno.c. nico@207:
RTIME last_occured_alarm | nico@207:
nico@207: nico@207:
nico@207: Definition at line 19 of file timers_xeno.c. nico@207:
RTIME last_time_read | nico@207:
nico@207: nico@207:
nico@207: Definition at line 18 of file timers_xeno.c. nico@207:
char stop_timer = 0 | nico@207:
nico@207: nico@207:
nico@207: Definition at line 22 of file timers_xeno.c. nico@207:
RT_TASK timerloop_task | nico@207:
nico@207: nico@207:
nico@207: Definition at line 17 of file timers_xeno.c. nico@207:
nico@207: