summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/src/phy.c
diff options
context:
space:
mode:
authorNicolas Schodet2010-08-24 14:30:22 +0200
committerNicolas Schodet2010-08-24 16:47:05 +0200
commite982b943ffa749a50b4410617672de44a94f74e6 (patch)
tree98a053090f5d8c50103d07ece0ce67bdec67cc02 /cesar/hal/phy/src/phy.c
parent5d0d2d95d2baa04268399c0a547a81f1bf796fd7 (diff)
cesar/hal/phy: add SPOC lib/stats variable, closes #1827
Diffstat (limited to 'cesar/hal/phy/src/phy.c')
-rw-r--r--cesar/hal/phy/src/phy.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/cesar/hal/phy/src/phy.c b/cesar/hal/phy/src/phy.c
index c76d7ade09..5283192c09 100644
--- a/cesar/hal/phy/src/phy.c
+++ b/cesar/hal/phy/src/phy.c
@@ -97,6 +97,8 @@ struct phy_tunable_t
int mafadese_coef_filter_band0[26];
/** MAFADESE filters, band 1. */
int mafadese_coef_filter_band1[26];
+ /** SPOC initial setting. */
+ s32 spoc_rho_initial_q30;
};
typedef struct phy_tunable_t phy_tunable_t;
@@ -108,6 +110,7 @@ static phy_tunable_t phy_tunable =
{
PHY_PARAM_MAFADESE_COEF_FILTER_BAND0,
PHY_PARAM_MAFADESE_COEF_FILTER_BAND1,
+ 0
};
/** Specific Phy VSR. */
@@ -347,6 +350,10 @@ phy_init_tunable_param (void)
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25);
#undef REGISTER_TUNABLE_MAFADESE_FILTER
+ lib_stats_set_stat_value_notype ("SPOC_RHO_INITIAL_Q30",
+ &phy_tunable.spoc_rho_initial_q30,
+ LIB_STATS_ACCESS_WRITE_ONLY,
+ LIB_STATS_DEBUG);
#endif
}
@@ -453,7 +460,7 @@ phy_init (void *user_data, phy_rx_fc_cb_t rx_fc_cb, phy_access_cb_t access_cb,
PHY_DSPSS_USED_CARRIERS_EXT10 = PHY_HP10_CARRIER_NB;
PHY_DSPSS_FIRST_CARRIER_EXT10 = PHY_HP10_CARRIER_OFFSET;
/* SPOC. */
- phy_spoc_init (ctx);
+ phy_spoc_init (ctx, 0);
/* MIA. */
PHY_DSPSS_MIA_PARAM = PHY_PARAMS (PHY_DSPSS, MIA_PARAM, USE_SNR_IN_LLR);
PHY_DSPSS_MIA_SF_BPSK = PHY_PARAM_MIA_SF_BPSK;
@@ -598,7 +605,7 @@ phy_set_robo_param (phy_t *ctx, u32 *tonemask, uint carrier_nb)
}
static void
-phy_set_tunable_param (void)
+phy_set_tunable_param (phy_t *ctx)
{
uint i;
for (i = 0; i < COUNT (phy_tunable.mafadese_coef_filter_band0); i++)
@@ -607,6 +614,7 @@ phy_set_tunable_param (void)
for (i = 0; i < COUNT (phy_tunable.mafadese_coef_filter_band1); i++)
PHY_DSPSS_MAFADESE_COEF_FILTER_BAND_1_n[i] =
phy_tunable.mafadese_coef_filter_band1[i];
+ phy_spoc_init (ctx, phy_tunable.spoc_rho_initial_q30);
}
static void
@@ -693,7 +701,7 @@ phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
PHY_DSPSS_HP10_FC_MASK_1 = 0x000E0000;
PHY_DSPSS_HP10_FC_MASK_2 = 0xFFF00060;
/* Set tunable parameters. */
- phy_set_tunable_param ();
+ phy_set_tunable_param (ctx);
/* Set ROBO parameters. */
phy_set_robo_param (ctx, tonemask, carrier_nb);
/* Create preamble. */