summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/maximus
diff options
context:
space:
mode:
authorschodet2009-09-03 14:36:06 +0000
committerschodet2009-09-03 14:36:06 +0000
commitbda70cc5630665dcda6267dcf99864ef5e13fcd3 (patch)
tree84348b10b301baea4e4eed0fe6e30144c5752444 /cesar/hal/phy/maximus
parentc4f6ee27d4a5ebd33420f0a2a346b542c4627e7b (diff)
* hal/phy, hal/phy/spoc (re #475):
- remove phy_sysclock_set_freqerror: this should be done on SPOC coefficients update. - move register writing at initialisation to hal/phy/spoc. - full double-free interface. - create structure to store SPOC computation results until registers are updated. - create two functions for register update (TX and RX). git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5414 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/hal/phy/maximus')
-rw-r--r--cesar/hal/phy/maximus/Module3
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_ctrl.c25
-rw-r--r--cesar/hal/phy/maximus/src/maximus_spoc.c42
-rw-r--r--cesar/hal/phy/maximus/test/src/test_phy_ctrl.c16
4 files changed, 44 insertions, 42 deletions
diff --git a/cesar/hal/phy/maximus/Module b/cesar/hal/phy/maximus/Module
index 01e9c8a30d..e5f1fc8ab9 100644
--- a/cesar/hal/phy/maximus/Module
+++ b/cesar/hal/phy/maximus/Module
@@ -1,5 +1,6 @@
SOURCES := maximus_phy_access.c maximus_bridgedma.c maximus_phy_ctrl.c \
- maximus_phy_ctrl_cb.c maximus_pbdma.c maximus_tmdma.c maximus_aes.c
+ maximus_phy_ctrl_cb.c maximus_pbdma.c maximus_tmdma.c \
+ maximus_aes.c maximus_spoc.c
MODULES := hal/phy/maximus/dur
ifeq ($(CONFIG_TRACE),y)
diff --git a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
index 13623a7395..e3fc8090f2 100644
--- a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
+++ b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
@@ -2629,31 +2629,6 @@ phy_tx_cancel (phy_t *ctx)
/**
- * Store the STA SYS clock frequency error value relative to CCo clock in ppm,
- * useful for interpolation block in the DSP.
- * \param ctx phy context
- * \param rho_ppm frequency error
- * set errno to:
- * - EINVAL if ctx is null
- */
-void
-phy_sysclock_set_freqerror (phy_t *ctx, double rho_ppm)
-{
- dbg_assert_ptr(ctx);
- if (NULL == ctx)
- {
- errno = EINVAL;
- station_log(&my_station, STATION_LOG_ERROR, STATION_LOGTYPE_PHY,
- "%s: errno = %d", __FUNCTION__, errno);
- }
- else
- {
- // TODO
- }
-}
-
-
-/**
* Set RX parameters.
* \param ctx phy context
* \param fc_mode frame control mode
diff --git a/cesar/hal/phy/maximus/src/maximus_spoc.c b/cesar/hal/phy/maximus/src/maximus_spoc.c
new file mode 100644
index 0000000000..9572b01704
--- /dev/null
+++ b/cesar/hal/phy/maximus/src/maximus_spoc.c
@@ -0,0 +1,42 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/phy/maximus/src/maximus_spoc.c
+ * \brief Empty SPOC maximus stub.
+ * \ingroup maximus
+ */
+#include "common/std.h"
+
+#include "hal/phy/spoc/spoc.h"
+#include "hal/phy/spoc/inc/defs.h"
+
+void
+phy_spoc_compute_all (s32 rho_q30, phy_spoc_coeff_t *coeff)
+{
+ dbg_assert (rho_q30 >= -PHY_SPOC_RHO_MAX_Q30
+ && rho_q30 <= PHY_SPOC_RHO_MAX_Q30);
+ dbg_assert_ptr (coeff);
+ dbg_assert_ptr (coeff->part2);
+}
+
+void
+phy_spoc_tx_set (phy_t *ctx, phy_spoc_coeff_t *coeff)
+{
+ dbg_assert (ctx);
+ dbg_assert_ptr (coeff);
+ dbg_assert_ptr (coeff->part2);
+}
+
+void
+phy_spoc_rx_set (phy_t *ctx, phy_spoc_coeff_t *coeff)
+{
+ dbg_assert (ctx);
+ dbg_assert_ptr (coeff);
+ dbg_assert_ptr (coeff->part2);
+}
+
diff --git a/cesar/hal/phy/maximus/test/src/test_phy_ctrl.c b/cesar/hal/phy/maximus/test/src/test_phy_ctrl.c
index 98e1f8c31f..915ccfb472 100644
--- a/cesar/hal/phy/maximus/test/src/test_phy_ctrl.c
+++ b/cesar/hal/phy/maximus/test/src/test_phy_ctrl.c
@@ -2946,21 +2946,6 @@ void maximus_phy_send_test_case(test_t t)
} test_end;
}
-void phy_sysclock_set_freqerror_test_case(test_t t)
-{
- printf("sysclock set freqerror\n");
- test_case_begin(t, "sysclock set freqerror");
-
- test_begin(t, "sysclock set freqerror")
- {
- double phy_clock = 1234567890;
-
- phy_sysclock_set_freqerror (ctx, phy_clock);
- } test_end;
-
- return;
-}
-
void phy_rx_param_test_case(test_t t)
{
printf("rx param\n");
@@ -3864,7 +3849,6 @@ void phy_ctrl_test_suite(test_t t)
maximus_phy_send_test_case(t);
phy_tx_param_sound_test_case(t);
maximus_phy_tx_frame_sound_test_case(t);
- phy_sysclock_set_freqerror_test_case(t);
phy_rx_param_test_case(t);
phy_rx_activate_test_case(t);
phy_rx_prepare_test_case(t);