
nico@207: \hypertarget{timers__xeno_8c}{
nico@207: \section{/home/epimerde/documents/tc11/Can\-Festival-3/drivers/timers\_\-xeno/timers\_\-xeno.c File Reference}
nico@207: \label{timers__xeno_8c}\index{/home/epimerde/documents/tc11/CanFestival-3/drivers/timers_xeno/timers_xeno.c@{/home/epimerde/documents/tc11/CanFestival-3/drivers/timers\_\-xeno/timers\_\-xeno.c}}
nico@207: }
nico@207: {\tt \#include $<$stdlib.h$>$}\par
nico@207: {\tt \#include $<$unistd.h$>$}\par
nico@207: {\tt \#include $<$sys/mman.h$>$}\par
nico@207: {\tt \#include $<$native/task.h$>$}\par
nico@207: {\tt \#include $<$native/timer.h$>$}\par
nico@207: {\tt \#include $<$native/mutex.h$>$}\par
nico@207: {\tt \#include $<$native/alarm.h$>$}\par
nico@207: {\tt \#include \char`\"{}applicfg.h\char`\"{}}\par
nico@207: {\tt \#include \char`\"{}can\_\-driver.h\char`\"{}}\par
nico@207: {\tt \#include \char`\"{}timer.h\char`\"{}}\par
nico@207: \subsection*{Defines}
nico@207: \begin{CompactItemize}
nico@207: \item 
nico@207: \#define \hyperlink{timers__xeno_8c_3e43352afeb0977d4e99f3590026c9ee}{TIMERLOOP\_\-TASK\_\-CREATED}~1
nico@207: \end{CompactItemize}
nico@207: \subsection*{Functions}
nico@207: \begin{CompactItemize}
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_f37d89241d0a9ac0430a0db6c1ead3d2}{cleanup\_\-all} (void)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_8758484f3cebb0cd44bb247c3f23d5e3}{Stop\-Timer\-Loop} (void)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_d7fee43b8a44cf8b7036853593044037}{Enter\-Mutex} (void)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_73d9a4eb941fb20cf6b597840510394b}{Leave\-Mutex} (void)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_15986eb72a64e72df6600dc23c1e19c8}{timerloop\_\-task\_\-proc} (void $\ast$arg)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_c9e1731843825eb55e7a94894e6a8ec5}{Start\-Timer\-Loop} (\hyperlink{timer_8h_f7d102e060339d3730ceae5fea03691b}{Timer\-Callback\_\-t} init\_\-callback)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_d009be934c04ee04b8e5a1cb5af08efd}{Create\-Receive\-Task} (\hyperlink{win32_2applicfg_8h_7ef59f941603c6680e74fc335523f17e}{CAN\_\-PORT} fd0, TASK\_\-HANDLE $\ast$Receive\-Loop\_\-task, void $\ast$Receive\-Loop\_\-task\_\-proc)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_aee2aa5ebcc60c3f2231f59c1c7beab0}{Wait\-Receive\-Task\-End} (TASK\_\-HANDLE $\ast$Thread)
nico@207: \item 
nico@207: void \hyperlink{timers__xeno_8c_b8d05dee70f04b5c5190ab00e84da106}{set\-Timer} (TIMEVAL value)
nico@207: \item 
nico@207: TIMEVAL \hyperlink{timers__xeno_8c_4dccc204d52176bd547ab34d6858f5ba}{get\-Elapsed\-Time} (void)
nico@207: \end{CompactItemize}
nico@207: \subsection*{Variables}
nico@207: \begin{CompactItemize}
nico@207: \item 
nico@207: RT\_\-MUTEX \hyperlink{timers__xeno_8c_b6ebfe5bfc980bae026866758af3a7ff}{Can\-Festival\_\-mutex}
nico@207: \item 
nico@207: RT\_\-TASK \hyperlink{timers__xeno_8c_3921261b6599c37eb3830a799d05f32e}{timerloop\_\-task}
nico@207: \item 
nico@207: RTIME \hyperlink{timers__xeno_8c_b64940b870e06e40ac13634a9e2b9ac2}{last\_\-time\_\-read}
nico@207: \item 
nico@207: RTIME \hyperlink{timers__xeno_8c_faf0ed3ab58750ccf1a09c52f7304cc3}{last\_\-occured\_\-alarm}
nico@207: \item 
nico@207: RTIME \hyperlink{timers__xeno_8c_e2985cf19e9415625d21f0f79b580fd0}{last\_\-alarm\_\-set}
nico@207: \item 
nico@207: char \hyperlink{timers__xeno_8c_c006a038004f458645d9f7ef06c7bd04}{stop\_\-timer} = 0
nico@207: \end{CompactItemize}
nico@207: 
nico@207: 
nico@207: \subsection{Define Documentation}
nico@207: \hypertarget{timers__xeno_8c_3e43352afeb0977d4e99f3590026c9ee}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!TIMERLOOP_TASK_CREATED@{TIMERLOOP\_\-TASK\_\-CREATED}}
nico@207: \index{TIMERLOOP_TASK_CREATED@{TIMERLOOP\_\-TASK\_\-CREATED}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[TIMERLOOP\_\-TASK\_\-CREATED]{\setlength{\rightskip}{0pt plus 5cm}\#define TIMERLOOP\_\-TASK\_\-CREATED~1}}
nico@207: \label{timers__xeno_8c_3e43352afeb0977d4e99f3590026c9ee}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 14 of file timers\_\-xeno.c.
nico@207: 
nico@207: \subsection{Function Documentation}
nico@207: \hypertarget{timers__xeno_8c_f37d89241d0a9ac0430a0db6c1ead3d2}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!cleanup_all@{cleanup\_\-all}}
nico@207: \index{cleanup_all@{cleanup\_\-all}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[cleanup\_\-all]{\setlength{\rightskip}{0pt plus 5cm}void cleanup\_\-all (void)}}
nico@207: \label{timers__xeno_8c_f37d89241d0a9ac0430a0db6c1ead3d2}
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.\hypertarget{timers__xeno_8c_d009be934c04ee04b8e5a1cb5af08efd}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!CreateReceiveTask@{CreateReceiveTask}}
nico@207: \index{CreateReceiveTask@{CreateReceiveTask}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[CreateReceiveTask]{\setlength{\rightskip}{0pt plus 5cm}void Create\-Receive\-Task (\hyperlink{win32_2applicfg_8h_7ef59f941603c6680e74fc335523f17e}{CAN\_\-PORT} {\em fd0}, TASK\_\-HANDLE $\ast$ {\em Receive\-Loop\_\-task}, void $\ast$ {\em Receive\-Loop\_\-task\_\-proc})}}
nico@207: \label{timers__xeno_8c_d009be934c04ee04b8e5a1cb5af08efd}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 93 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_d7fee43b8a44cf8b7036853593044037}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!EnterMutex@{EnterMutex}}
nico@207: \index{EnterMutex@{EnterMutex}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[EnterMutex]{\setlength{\rightskip}{0pt plus 5cm}void Enter\-Mutex (void)}}
nico@207: \label{timers__xeno_8c_d7fee43b8a44cf8b7036853593044037}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 35 of file timers\_\-xeno.c.
nico@207: 
nico@207: References Can\-Festival\_\-mutex.\hypertarget{timers__xeno_8c_4dccc204d52176bd547ab34d6858f5ba}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!getElapsedTime@{getElapsedTime}}
nico@207: \index{getElapsedTime@{getElapsedTime}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[getElapsedTime]{\setlength{\rightskip}{0pt plus 5cm}TIMEVAL get\-Elapsed\-Time (void)}}
nico@207: \label{timers__xeno_8c_4dccc204d52176bd547ab34d6858f5ba}
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.\hypertarget{timers__xeno_8c_73d9a4eb941fb20cf6b597840510394b}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!LeaveMutex@{LeaveMutex}}
nico@207: \index{LeaveMutex@{LeaveMutex}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[LeaveMutex]{\setlength{\rightskip}{0pt plus 5cm}void Leave\-Mutex (void)}}
nico@207: \label{timers__xeno_8c_73d9a4eb941fb20cf6b597840510394b}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 40 of file timers\_\-xeno.c.
nico@207: 
nico@207: References Can\-Festival\_\-mutex.\hypertarget{timers__xeno_8c_b8d05dee70f04b5c5190ab00e84da106}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!setTimer@{setTimer}}
nico@207: \index{setTimer@{setTimer}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[setTimer]{\setlength{\rightskip}{0pt plus 5cm}void set\-Timer (TIMEVAL {\em value})}}
nico@207: \label{timers__xeno_8c_b8d05dee70f04b5c5190ab00e84da106}
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.\hypertarget{timers__xeno_8c_c9e1731843825eb55e7a94894e6a8ec5}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!StartTimerLoop@{StartTimerLoop}}
nico@207: \index{StartTimerLoop@{StartTimerLoop}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[StartTimerLoop]{\setlength{\rightskip}{0pt plus 5cm}void Start\-Timer\-Loop (\hyperlink{timer_8h_f7d102e060339d3730ceae5fea03691b}{Timer\-Callback\_\-t} {\em init\_\-callback})}}
nico@207: \label{timers__xeno_8c_c9e1731843825eb55e7a94894e6a8ec5}
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(), get\-Elapsed\-Time(), last\_\-alarm\_\-set, last\_\-occured\_\-alarm, last\_\-time\_\-read, Set\-Alarm(), stop\_\-timer, timerloop\_\-task, and timerloop\_\-task\_\-proc().\hypertarget{timers__xeno_8c_8758484f3cebb0cd44bb247c3f23d5e3}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!StopTimerLoop@{StopTimerLoop}}
nico@207: \index{StopTimerLoop@{StopTimerLoop}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[StopTimerLoop]{\setlength{\rightskip}{0pt plus 5cm}void Stop\-Timer\-Loop (void)}}
nico@207: \label{timers__xeno_8c_8758484f3cebb0cd44bb247c3f23d5e3}
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.\hypertarget{timers__xeno_8c_15986eb72a64e72df6600dc23c1e19c8}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!timerloop_task_proc@{timerloop\_\-task\_\-proc}}
nico@207: \index{timerloop_task_proc@{timerloop\_\-task\_\-proc}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[timerloop\_\-task\_\-proc]{\setlength{\rightskip}{0pt plus 5cm}void timerloop\_\-task\_\-proc (void $\ast$ {\em arg})}}
nico@207: \label{timers__xeno_8c_15986eb72a64e72df6600dc23c1e19c8}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 45 of file timers\_\-xeno.c.
nico@207: 
nico@207: References Enter\-Mutex(), last\_\-alarm\_\-set, last\_\-occured\_\-alarm, Leave\-Mutex(), stop\_\-timer, and Time\-Dispatch().\hypertarget{timers__xeno_8c_aee2aa5ebcc60c3f2231f59c1c7beab0}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!WaitReceiveTaskEnd@{WaitReceiveTaskEnd}}
nico@207: \index{WaitReceiveTaskEnd@{WaitReceiveTaskEnd}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[WaitReceiveTaskEnd]{\setlength{\rightskip}{0pt plus 5cm}void Wait\-Receive\-Task\-End (TASK\_\-HANDLE $\ast$ {\em Thread})}}
nico@207: \label{timers__xeno_8c_aee2aa5ebcc60c3f2231f59c1c7beab0}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 117 of file timers\_\-xeno.c.
nico@207: 
nico@207: \subsection{Variable Documentation}
nico@207: \hypertarget{timers__xeno_8c_b6ebfe5bfc980bae026866758af3a7ff}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!CanFestival_mutex@{CanFestival\_\-mutex}}
nico@207: \index{CanFestival_mutex@{CanFestival\_\-mutex}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[CanFestival\_\-mutex]{\setlength{\rightskip}{0pt plus 5cm}RT\_\-MUTEX \hyperlink{timers__xeno_8c_b6ebfe5bfc980bae026866758af3a7ff}{Can\-Festival\_\-mutex}}}
nico@207: \label{timers__xeno_8c_b6ebfe5bfc980bae026866758af3a7ff}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 16 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_e2985cf19e9415625d21f0f79b580fd0}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!last_alarm_set@{last\_\-alarm\_\-set}}
nico@207: \index{last_alarm_set@{last\_\-alarm\_\-set}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[last\_\-alarm\_\-set]{\setlength{\rightskip}{0pt plus 5cm}RTIME \hyperlink{timers__xeno_8c_e2985cf19e9415625d21f0f79b580fd0}{last\_\-alarm\_\-set}}}
nico@207: \label{timers__xeno_8c_e2985cf19e9415625d21f0f79b580fd0}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 20 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_faf0ed3ab58750ccf1a09c52f7304cc3}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!last_occured_alarm@{last\_\-occured\_\-alarm}}
nico@207: \index{last_occured_alarm@{last\_\-occured\_\-alarm}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[last\_\-occured\_\-alarm]{\setlength{\rightskip}{0pt plus 5cm}RTIME \hyperlink{timers__xeno_8c_faf0ed3ab58750ccf1a09c52f7304cc3}{last\_\-occured\_\-alarm}}}
nico@207: \label{timers__xeno_8c_faf0ed3ab58750ccf1a09c52f7304cc3}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 19 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_b64940b870e06e40ac13634a9e2b9ac2}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!last_time_read@{last\_\-time\_\-read}}
nico@207: \index{last_time_read@{last\_\-time\_\-read}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[last\_\-time\_\-read]{\setlength{\rightskip}{0pt plus 5cm}RTIME \hyperlink{timers__xeno_8c_b64940b870e06e40ac13634a9e2b9ac2}{last\_\-time\_\-read}}}
nico@207: \label{timers__xeno_8c_b64940b870e06e40ac13634a9e2b9ac2}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 18 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_c006a038004f458645d9f7ef06c7bd04}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!stop_timer@{stop\_\-timer}}
nico@207: \index{stop_timer@{stop\_\-timer}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[stop\_\-timer]{\setlength{\rightskip}{0pt plus 5cm}char \hyperlink{timers__xeno_8c_c006a038004f458645d9f7ef06c7bd04}{stop\_\-timer} = 0}}
nico@207: \label{timers__xeno_8c_c006a038004f458645d9f7ef06c7bd04}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 22 of file timers\_\-xeno.c.\hypertarget{timers__xeno_8c_3921261b6599c37eb3830a799d05f32e}{
nico@207: \index{timers_xeno.c@{timers\_\-xeno.c}!timerloop_task@{timerloop\_\-task}}
nico@207: \index{timerloop_task@{timerloop\_\-task}!timers_xeno.c@{timers\_\-xeno.c}}
nico@207: \subsubsection[timerloop\_\-task]{\setlength{\rightskip}{0pt plus 5cm}RT\_\-TASK \hyperlink{timers__xeno_8c_3921261b6599c37eb3830a799d05f32e}{timerloop\_\-task}}}
nico@207: \label{timers__xeno_8c_3921261b6599c37eb3830a799d05f32e}
nico@207: 
nico@207: 
nico@207: 
nico@207: 
nico@207: Definition at line 17 of file timers\_\-xeno.c.



