summaryrefslogtreecommitdiff
path: root/cesar/hal/timer/inc/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/timer/inc/context.h')
-rw-r--r--cesar/hal/timer/inc/context.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/cesar/hal/timer/inc/context.h b/cesar/hal/timer/inc/context.h
new file mode 100644
index 0000000000..88eaf766c1
--- /dev/null
+++ b/cesar/hal/timer/inc/context.h
@@ -0,0 +1,39 @@
+#ifndef hal_timer_inc_context_h
+#define hal_timer_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/timer/inc/context.h
+ * \brief API timer context.
+ * \ingroup hal/timer
+ *
+ */
+
+#include <cyg/kernel/kapi.h>
+
+#include "lib/heap.h"
+#include "hal/leon/timer.h"
+#include "hal/phy/phy.h"
+
+struct hal_timer_t
+{
+ /** Timer status. */
+ bool status;
+ /** Timer context. */
+ leon_timer_t *leon_timer;
+ /** Heap to store order instances. */
+ heap_t heap;
+ /** Mutex for the heap. */
+ cyg_mutex_t heap_mutex;
+ /** phy context. */
+ phy_t *phy;
+ /** Current instance beeing process. */
+ hal_timer_instance_t *current_instance;
+};
+
+#endif /* hal_timer_inc_context_h */