summaryrefslogtreecommitdiff
path: root/cesar/hal
diff options
context:
space:
mode:
authorNicolas Schodet2013-02-04 17:31:13 +0100
committerNicolas Schodet2013-03-29 13:35:00 +0100
commit28e656b8079f4567cddb553ec0ae3eb4ce75b5a3 (patch)
tree58054b5ecf397c00256aab969cc05b0882e8e7a9 /cesar/hal
parent281e8668e47d0fe4a13eef28a7d9321f48624bd6 (diff)
cesar/hal/phy/test/phy: add delta setting with freq error, closes #3896
Diffstat (limited to 'cesar/hal')
-rw-r--r--cesar/hal/phy/test/phy/doc/test_phy.txt2
-rw-r--r--cesar/hal/phy/test/phy/src/test_phy.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/cesar/hal/phy/test/phy/doc/test_phy.txt b/cesar/hal/phy/test/phy/doc/test_phy.txt
index 6b0f3cdd28..beed3f87f3 100644
--- a/cesar/hal/phy/test/phy/doc/test_phy.txt
+++ b/cesar/hal/phy/test/phy/doc/test_phy.txt
@@ -502,6 +502,8 @@ rho_q30 (int)
use int (round (3e-6 * (2 ** 30))).
rho (float)
If provided, this is converted to rho_q30, see above.
+sync (boolean, default: false)
+ Frequency error is synchronised, use external data.
TestPhy.set_pb
--------------
diff --git a/cesar/hal/phy/test/phy/src/test_phy.c b/cesar/hal/phy/test/phy/src/test_phy.c
index 75a6d3d70a..decad4fa3b 100644
--- a/cesar/hal/phy/test/phy/src/test_phy.c
+++ b/cesar/hal/phy/test/phy/src/test_phy.c
@@ -428,8 +428,11 @@ test_phy_set_freqerror_fcall (fcall_ctx_t *fcall, fcall_param_t **param,
return -1;
/* Decode. */
s32 rho_q30;
+ bool sync;
if (!fcall_param_bind_long_helper ("rho_q30", rho_q30))
return -1;
+ if (!fcall_param_bind_helper ("sync", sync))
+ sync = false;
/* Use it. */
phy_spoc_coeff_t coeff;
phy_spoc_coeff_part2_t coeff_part2;
@@ -437,6 +440,7 @@ test_phy_set_freqerror_fcall (fcall_ctx_t *fcall, fcall_param_t **param,
phy_spoc_compute_all (rho_q30, &coeff);
phy_spoc_tx_set (ctx->phy, &coeff);
phy_spoc_rx_set (ctx->phy, &coeff);
+ phy_freq_error_set (ctx->phy, sync, rho_q30);
phy_prepare (ctx->phy, PHY_PREPARE_TYPE_PREAMBLE, true);
phy_prepare (ctx->phy, PHY_PREPARE_TYPE_PRS, true);
/* Return. */