summaryrefslogtreecommitdiffstats
path: root/src/target
diff options
context:
space:
mode:
Diffstat (limited to 'src/target')
-rw-r--r--src/target/firmware/include/layer1/rfch.h2
-rw-r--r--src/target/firmware/layer1/rfch.c19
2 files changed, 16 insertions, 5 deletions
diff --git a/src/target/firmware/include/layer1/rfch.h b/src/target/firmware/include/layer1/rfch.h
index 344523c3..0c4f9a0f 100644
--- a/src/target/firmware/include/layer1/rfch.h
+++ b/src/target/firmware/include/layer1/rfch.h
@@ -3,7 +3,7 @@
struct gsm_time;
-void rfch_get_params(struct gsm_time *t,
+void rfch_get_params(const struct gsm_time *t,
uint16_t *arfcn_p, uint8_t *tsc_p, uint8_t *tn_p);
#endif /* _L1_RFCH_H */
diff --git a/src/target/firmware/layer1/rfch.c b/src/target/firmware/layer1/rfch.c
index d0818d04..3c4e6764 100644
--- a/src/target/firmware/layer1/rfch.c
+++ b/src/target/firmware/layer1/rfch.c
@@ -82,9 +82,16 @@ static int pow_nbin_mask(int n)
return x;
}
-static int16_t rfch_hop_seq_gen(struct gsm_time *t,
+/*! Hopping sequence generator.
+ * \param[in] t GSM time (frame number)
+ * \param[in] hsn Hopping Sequence Number
+ * \param[in] maio Mobile Allocation Index OFfset
+ * \param[in] n number of entries in mobile allocation (arfcn table)
+ * \param[in] arfcn_tbl Array of ARFCN representing the mobile allocation
+ * \returns ARFCN to use for given input parameters at time 't' or MAI if arfcn_tbl == NULL */
+static int16_t rfch_hop_seq_gen(const struct gsm_time *t,
uint8_t hsn, uint8_t maio,
- uint8_t n, uint16_t *arfcn_tbl)
+ uint8_t n, const uint16_t *arfcn_tbl)
{
int mai;
@@ -114,8 +121,12 @@ static int16_t rfch_hop_seq_gen(struct gsm_time *t,
}
-/* RF Channel parameters */
-void rfch_get_params(struct gsm_time *t,
+/*! Get RF Channel parameters at a given GSM time (frame number)
+ * \param[in] t GSM time for which to obtain parameters
+ * \param[out] arfcn_p ARFCN to use at time t
+ * \oaram[out] tsc_p Training sequence to use at time t
+ * \param[out] tn_p Timeslot Number to use at time t */
+void rfch_get_params(const struct gsm_time *t,
uint16_t *arfcn_p, uint8_t *tsc_p, uint8_t *tn_p)
{
if (l1s.dedicated.type == GSM_DCHAN_NONE) {