summaryrefslogtreecommitdiff
path: root/source/LCM/include/t_time_utilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/LCM/include/t_time_utilities.h')
-rw-r--r--source/LCM/include/t_time_utilities.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/source/LCM/include/t_time_utilities.h b/source/LCM/include/t_time_utilities.h
new file mode 100644
index 0000000..bcc8254
--- /dev/null
+++ b/source/LCM/include/t_time_utilities.h
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (C) ST-Ericsson SA 2011
+ * License terms: 3-clause BSD license
+ ******************************************************************************/
+#ifndef _T_TIME_UTILITIES_H_
+#define _T_TIME_UTILITIES_H_
+/**
+ * @addtogroup ldr_time_utilities
+ * @{
+ */
+
+/*******************************************************************************
+ * Types, constants
+ ******************************************************************************/
+
+/** MAX defined timers */
+#define MAX_TIMERS 100
+
+/** defined type of function pointer to the handle function */
+typedef void (*HandleFunction_t)(void *Param_p, void *Timer_p, void *Data_p);
+
+/**
+ * Structure of timer data
+ */
+typedef struct {
+ uint32 Time; /**< Requested for timer time.*/
+ uint32 PeriodicalTime; /**< Requested periodical time for timer.*/
+ HandleFunction_t HandleFunction_p; /**< Callback function*/
+ void *Data_p; /**< Pointer to data. */
+ void *Param_p; /**< Extra parameters. */
+} Timer_t;
+
+/**
+ * Header for buffer of timers
+ */
+typedef struct {
+ uint32 MaxTimers;
+ uint32 ActiveTimers;
+ Timer_t *Timers_p;
+} TimerHeader_t;
+
+/** @} */
+#endif /*_T_TIME_UTILITIES_H_*/