summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/inc
diff options
context:
space:
mode:
authordufour2009-05-27 14:47:32 +0000
committerdufour2009-05-27 14:47:32 +0000
commitb15cfae62562c6a3ba9df54ddbd25af520c1e7ad (patch)
tree21168ebffe96c7c2c79e382dd519db5f965d4c12 /cesar/ce/rx/inc
parent281d960efc02e16b0b1e4c5c2b44d4b644932a4f (diff)
* ce/rx, cp/sta/core:
- add a new flag event in the cp/sta/core when the CE RX want to send an MME, - add a mailbox for the communication between the CE RX and the CP, - add functions to process works of the CE RX from the CP context (not integrated in the CP) and generate MME, - add function to add some works for the CP from the CE RX context (this will be integrated in the bitloading), - add stubs (tests are missing). git-svn-id: svn+ssh://pessac/svn/cesar/trunk@4711 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/ce/rx/inc')
-rw-r--r--cesar/ce/rx/inc/cp.h76
-rw-r--r--cesar/ce/rx/inc/rx.h17
2 files changed, 93 insertions, 0 deletions
diff --git a/cesar/ce/rx/inc/cp.h b/cesar/ce/rx/inc/cp.h
new file mode 100644
index 0000000000..09f5d0244a
--- /dev/null
+++ b/cesar/ce/rx/inc/cp.h
@@ -0,0 +1,76 @@
+#ifndef ce_rx_inc_cp_h
+#define ce_rx_inc_cp_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/rx/inc/cp.h
+ * \brief Interface to use the CE RX in the CP context (private part).
+ * \ingroup ce_rx
+ *
+ * This header contains the private part of the functions used for the
+ * interface between the communication of the CP and the CE RX.
+ */
+
+#include "lib/mbox.h"
+#include "cp/types.h"
+
+/**
+ * Maibox used for the exchange of work between the CE RX and the CP.
+ * The information contains in this node are enough to send a tone map
+ * (pointed with the tone map index) to a peer (pointed by its TEI).
+ */
+typedef struct ce_rx_cp_mbox_t
+{
+ /**
+ * The mailbox node.
+ */
+ mbox_node_t mbox_node;
+ /**
+ * The TEI of the peer.
+ */
+ cp_tei_t tei;
+ /**
+ * The tone map index.
+ */
+ u8 tmi;
+ /**
+ * Initial CE?
+ */
+ bool initial_ce;
+} ce_rx_cp_mbox_t;
+
+BEGIN_DECLS
+
+/**
+ * Initialize the communication between the CE RX and the CP.
+ * \param ce_rx the CE RX context.
+ */
+void
+ce_rx_cp_init (ce_rx_t *ce_rx);
+
+/**
+ * Uninitialize the communication between the CE RX and the CP.
+ * \param ce_rx the CE RX context.
+ */
+void
+ce_rx_cp_uninit (ce_rx_t *ce_rx);
+
+/**
+ * Add work for the CP from the CE RX context.
+ * \param ce_rx the context of the CE in RX.
+ * \param tei the TEI of the peer.
+ * \param tmi the new TMI that required to be sent.
+ * \param initial_ce initial channel estimation?
+ */
+void
+ce_rx_cp_send_tone_map_mme (ce_rx_t *ce_rx, cp_tei_t tei, u8 tmi,
+ bool initial_ce);
+
+END_DECLS
+
+#endif /* ce_rx_inc_cp_h */
diff --git a/cesar/ce/rx/inc/rx.h b/cesar/ce/rx/inc/rx.h
index 81721e09d9..7e875eebab 100644
--- a/cesar/ce/rx/inc/rx.h
+++ b/cesar/ce/rx/inc/rx.h
@@ -23,6 +23,7 @@
#include <cyg/hal/hal_arch.h>
#include "ce/rx/rx.h"
+#include "ce/rx/cp.h"
#include "common/defs/priority.h"
@@ -67,6 +68,22 @@ struct ce_rx_t
* Cache slab allocator for the mailbox nodes.
*/
slab_cache_t measure_cache;
+ /**
+ * Mailbox for the exchange wih the CP.
+ */
+ mbox_t cp_mbox;
+ /**
+ * Cache SLAB allocator for the CP mailbox nodes.
+ */
+ slab_cache_t cp_mbox_cache;
+ /**
+ * The CP context that need to be contacted when we send MME.
+ */
+ cp_t *cp_ctx;
+ /**
+ * The callback that need to be called when we need to send a MME.
+ */
+ ce_rx_cp_signal_work_t cp_cb;
};
/**