summaryrefslogtreecommitdiff
path: root/cesar/hal/leon/maximus/inc/maximus_timer_ctx.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/leon/maximus/inc/maximus_timer_ctx.h')
-rw-r--r--cesar/hal/leon/maximus/inc/maximus_timer_ctx.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/cesar/hal/leon/maximus/inc/maximus_timer_ctx.h b/cesar/hal/leon/maximus/inc/maximus_timer_ctx.h
new file mode 100644
index 0000000000..0ae1b6af19
--- /dev/null
+++ b/cesar/hal/leon/maximus/inc/maximus_timer_ctx.h
@@ -0,0 +1,53 @@
+#ifndef hal_leon_maximus_inc_maximus_timer_ctx_h
+#define hal_leon_maximus_inc_maximus_timer_ctx_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/leon/maximus_inc/maximus_timer_ctx.h
+ * \brief Leon Timer context for Maximus.
+ * \ingroup hal_leon_maximus
+ *
+ */
+
+#include "hal/leon/timer.h" // for 'leon_timer_cb_t'
+#include "host/netclock.h" // for 'netclock_id_t' and 'netclock_callback_t'
+#include "hal/leon/maximus/inc/maximus_trace.h"
+#ifdef ECOS
+#include <cyg/hal/drv_api.h>
+#endif /* ECOS */
+
+struct leon_timer_t
+{
+ /** Indicates the Leon timer status. false == stopped, true == launched. */
+ bool status;
+ /** Function callback to call. */
+ leon_timer_cb_t cb;
+ /** Callback user data. */
+ void *user_data;
+
+ /** Set to true to enable assertions on WARNING messages. */
+ bool warning_assert;
+ /** Id of netclock message sent by 'leon_timer_program()'. */
+ netclock_id_t netclock_id;
+ /** Callback context to insert into callback queue. */
+ netclock_callback_t *netclock_cb;
+
+#ifdef ECOS
+ /** leon timer interrupt descriptor for eCos */
+ cyg_interrupt it_timer;
+ /** leon timer interrupt handle */
+ cyg_handle_t it_handle;
+#endif /* ECOS */
+
+#if CONFIG_TRACE
+ /** PHY trace. */
+ trace_buffer_t trace;
+#endif /* CONFIG_TRACE */
+};
+
+#endif /* hal_leon_maximus_inc_maximus_timer_ctx_h */