Change in osmocom-bb[master]: firmware/rfch.[ch]: Document functions + constify input arguments

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Apr 23 11:06:52 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17932 )


Change subject: firmware/rfch.[ch]: Document functions + constify input arguments
......................................................................

firmware/rfch.[ch]: Document functions + constify input arguments

Change-Id: I16d5190b3cdc997c5609b52d41203f10264b017c
---
M src/target/firmware/include/layer1/rfch.h
M src/target/firmware/layer1/rfch.c
2 files changed, 16 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/32/17932/1

diff --git a/src/target/firmware/include/layer1/rfch.h b/src/target/firmware/include/layer1/rfch.h
index 344523c..0c4f9a0 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 d0818d0..a8b4ed0 100644
--- a/src/target/firmware/layer1/rfch.c
+++ b/src/target/firmware/layer1/rfch.c
@@ -82,9 +82,16 @@
 	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 allication (arfcn table)
+ * \param[in] arfcn_tbl Array of ARFCN representing the mobile allocation
+ * \returns ARFCN to use for given input parameters at time 't' */
+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 @@
 }
 
 
-/* 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) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17932
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I16d5190b3cdc997c5609b52d41203f10264b017c
Gerrit-Change-Number: 17932
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200423/1fb3145b/attachment.htm>


More information about the gerrit-log mailing list