summaryrefslogtreecommitdiff
path: root/cesar/mac
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac')
-rw-r--r--cesar/mac/pbproc/pbproc.h7
-rw-r--r--cesar/mac/pbproc/src/pbproc.c16
2 files changed, 21 insertions, 2 deletions
diff --git a/cesar/mac/pbproc/pbproc.h b/cesar/mac/pbproc/pbproc.h
index 12d11a3372..b9c7fc6009 100644
--- a/cesar/mac/pbproc/pbproc.h
+++ b/cesar/mac/pbproc/pbproc.h
@@ -289,6 +289,13 @@ pbproc_set_chandata_conf (pbproc_t *ctx, phy_chandata_conf_t *conf, uint nb,
bool data);
/**
+ * Reset SPOC parameters, when possible.
+ * \param ctx pbproc context
+ */
+void
+pbproc_spoc_reset (pbproc_t *ctx);
+
+/**
* Update SPOC with new parameters, when possible.
* \param ctx pbproc context
* \param sync whether frequency error is synchronised
diff --git a/cesar/mac/pbproc/src/pbproc.c b/cesar/mac/pbproc/src/pbproc.c
index 58cb68732d..8769b2ce0a 100644
--- a/cesar/mac/pbproc/src/pbproc.c
+++ b/cesar/mac/pbproc/src/pbproc.c
@@ -403,8 +403,8 @@ pbproc_set_chandata_conf (pbproc_t *ctx, phy_chandata_conf_t *conf, uint nb,
ctx->chandata_data = data;
}
-void
-pbproc_spoc_update (pbproc_t *ctx, bool sync, s32 rho_q30)
+static void
+pbproc_spoc_update_ (pbproc_t *ctx, bool sync, s32 rho_q30)
{
dbg_assert (ctx);
phy_spoc_coeff_t *coeff = blk_alloc ();
@@ -425,6 +425,18 @@ pbproc_spoc_update (pbproc_t *ctx, bool sync, s32 rho_q30)
arch_isr_unlock (flags);
}
+void
+pbproc_spoc_reset (pbproc_t *ctx)
+{
+ pbproc_spoc_update_ (ctx, false, 0);
+}
+
+void
+pbproc_spoc_update (pbproc_t *ctx, bool sync, s32 rho_q30)
+{
+ pbproc_spoc_update_ (ctx, sync, rho_q30);
+}
+
static bool
pbproc_spoc_update_cb (void *user)
{