include/timer.h
changeset 561 f9be4262c68d
parent 145 e747d2e26af0
--- a/include/timer.h	Wed Jul 15 17:19:09 2009 +0200
+++ b/include/timer.h	Thu Jul 16 10:06:57 2009 +0200
@@ -1,5 +1,5 @@
 /*
-This file is part of CanFestival, a library implementing CanOpen Stack. 
+This file is part of CanFestival, a library implementing CanOpen Stack.
 
 Copyright (C): Edouard TISSERANT and Francis DUPIN
 
@@ -53,12 +53,40 @@
 
 /* ---------  prototypes --------- */
 /*#define SetAlarm(d, id, callback, value, period) printf("%s, %d, SetAlarm(%s, %s, %s, %s, %s)\n",__FILE__, __LINE__, #d, #id, #callback, #value, #period); _SetAlarm(d, id, callback, value, period)*/
+/**
+ * @ingroup timer
+ * @brief Set an alarm to execute a callback function when expired.
+ * @param *d Pointer to a CAN object data structure
+ * @param id The alarm Id
+ * @param callback A callback function
+ * @param value Call the callback function at current time + value
+ * @param period Call periodically the callback function
+ * @return handle The timer handle
+ */
 TIMER_HANDLE SetAlarm(CO_Data* d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period);
+
+/**
+ * @ingroup timer
+ * @brief Delete an alarm before expiring.
+ * @param handle A timer handle
+ * @return The timer handle
+ */
 TIMER_HANDLE DelAlarm(TIMER_HANDLE handle);
+
 void TimeDispatch(void);
 
-/* ---------  to be defined in user app ---------*/
+/**
+ * @ingroup timer
+ * @brief Set a timerfor a given time.
+ * @param value The time value.
+ */
 void setTimer(TIMEVAL value);
+
+/**
+ * @ingroup timer
+ * @brief Get the time elapsed since latest timer occurence.
+ * @return time elapsed since latest timer occurence
+ */
 TIMEVAL getElapsedTime(void);
 
 #endif /* #define __timer_h__ */