nico@207: nico@207:
nico@207:#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
#include <signal.h>
#include "applicfg.h"
#include "timer.h"
nico@207: Go to the source code of this file.
Defines | |
#define | maxval(a, b) ((a>b)?a:b) |
Functions | |
void | EnterMutex (void) |
void | LeaveMutex (void) |
void | timer_notify (sigval_t val) |
void | initTimer (void) |
void | StopTimerLoop (void) |
void | StartTimerLoop (TimerCallback_t init_callback) |
void | CreateReceiveTask (CAN_PORT port, TASK_HANDLE *Thread, void *ReceiveLoopPtr) |
void | WaitReceiveTaskEnd (TASK_HANDLE Thread) |
void | setTimer (TIMEVAL value) |
TIMEVAL | getElapsedTime (void) |
Variables | |
pthread_mutex_t | CanFestival_mutex = PTHREAD_MUTEX_INITIALIZER |
TASK_HANDLE | TimerLoopThread |
TIMEVAL | last_time_set = TIMEVAL_MAX |
timeval | last_sig |
timer_t | timer |
#define maxval | 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@207: Definition at line 82 of file timers_unix.c. nico@207:
nico@207:
void CreateReceiveTask | nico@207:( | nico@207:CAN_PORT | nico@207:port, | nico@207:|
nico@207: | nico@207: | TASK_HANDLE * | nico@207:Thread, | nico@207:|
nico@207: | nico@207: | void * | nico@207:ReceiveLoopPtr | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 71 of file timers_unix.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 20 of file timers_unix.c. 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 98 of file timers_unix.c. nico@207:
nico@207: References last_sig. nico@207:
void initTimer | nico@207:( | nico@207:void | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 39 of file timers_unix.c. nico@207:
nico@207: References IO_PORTS_8, last_sig, lock(), TCTL1, TIE, timer, timer_notify(), TIOS, TSCR1, TSCR2, and unlock(). 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 25 of file timers_unix.c. 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 83 of file timers_unix.c. 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 62 of file timers_unix.c. 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 55 of file timers_unix.c. nico@207:
void timer_notify | nico@207:( | nico@207:sigval_t | nico@207:val | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 30 of file timers_unix.c. nico@207:
nico@207: References EnterMutex(), last_sig, LeaveMutex(), 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 76 of file timers_unix.c. nico@207:
nico@207:
pthread_mutex_t CanFestival_mutex = PTHREAD_MUTEX_INITIALIZER | nico@207:
nico@207: nico@207:
nico@207: Definition at line 10 of file timers_unix.c. nico@207:
struct timeval last_sig | nico@207:
nico@207: nico@207:
nico@207: Definition at line 16 of file timers_unix.c. nico@207:
TIMEVAL last_time_set = TIMEVAL_MAX | nico@207:
nico@207: nico@207:
nico@207: Definition at line 14 of file timers_unix.c. nico@207:
timer_t timer | nico@207:
nico@207: nico@207:
nico@207: Definition at line 18 of file timers_unix.c. nico@207:
TASK_HANDLE TimerLoopThread | nico@207:
nico@207: nico@207:
nico@207: Definition at line 12 of file timers_unix.c. nico@207:
nico@207: