summaryrefslogtreecommitdiff
path: root/cesar/hal/ipmbox/inc/ipmbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/ipmbox/inc/ipmbox.h')
-rw-r--r--cesar/hal/ipmbox/inc/ipmbox.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/cesar/hal/ipmbox/inc/ipmbox.h b/cesar/hal/ipmbox/inc/ipmbox.h
new file mode 100644
index 0000000000..5d45127b7d
--- /dev/null
+++ b/cesar/hal/ipmbox/inc/ipmbox.h
@@ -0,0 +1,48 @@
+#ifndef hal_ipmbox_inc_ipmbox_h
+#define hal_ipmbox_inc_ipmbox_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/ipmbox/inc/ipmbox.h
+ * \brief HAL IPMBox private data.
+ * \ingroup hal_ipmbox
+ *
+ * This file defines IPMBox context structure.
+ */
+#include "common/ipmbox/queue.h"
+#include "common/ipmbox/registers.h"
+
+#include "hal/ipmbox/inc/ecos.h"
+
+/** RX DATA budget. Number of words which can be handled in one
+ * execution. */
+#define IPMBOX_RX_DATA_BUDGET 128
+
+/** Context structure definition */
+struct ipmbox_t {
+ /** Queues, by types & directions. */
+ ipmbox_queue_t queue[IPMBOX_QUEUE_TYPE_NB][IPMBOX_QUEUE_DIRECTION_NB];
+ /** IPMBox registers. */
+ volatile ipmbox_registers_t *regs;
+ /** RX DATA user data. */
+ void *rx_cb_data_user_data;
+ /** RX MBX user data. */
+ void *rx_cb_mbx_user_data;
+ /** RX DATA DSR callback. */
+ ipmbox_rx_cb_t rx_cb_data;
+ /** RX MBX DSR callback. */
+ ipmbox_rx_cb_t rx_cb_mbx;
+ /* Empty buffer user data callback. */
+ void *empty_buf_cb_user_data;
+ /* Empty buffer DSR callback. */
+ ipmbox_empty_buf_cb_t empty_buf_cb;
+ /* eCos context. */
+ ipmbox_ecos_t ecos;
+};
+
+#endif /* hal_ipmbox_inc_ipmbox_h */