summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-09-26 21:29:23 +0200
committerSylvain Munaut <tnt@246tNt.com>2010-09-28 08:04:18 +0200
commitaef1e05d9aa862ddf3816e8d04a523aae35b7845 (patch)
treef81330ec8d8e07949250c89ce7436efacf6fd904
parentf8d372d7e414cbab90783f822ffe867dfd166045 (diff)
fw/layer1: Introduce prim.h for all primitive related things
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/target/firmware/include/layer1/prim.h24
-rw-r--r--src/target/firmware/include/layer1/sync.h5
-rw-r--r--src/target/firmware/layer1/l23_api.c1
-rw-r--r--src/target/firmware/layer1/mframe_sched.c3
4 files changed, 26 insertions, 7 deletions
diff --git a/src/target/firmware/include/layer1/prim.h b/src/target/firmware/include/layer1/prim.h
new file mode 100644
index 00000000..bbb8e9cd
--- /dev/null
+++ b/src/target/firmware/include/layer1/prim.h
@@ -0,0 +1,24 @@
+#ifndef _L1_PRIM_H
+#define _L1_PRIM_H
+
+#include <stdint.h>
+
+#include <layer1/tdma_sched.h>
+
+struct l1ctl_fbsb_req;
+
+/* Primitives tests/requests */
+void l1s_fb_test(uint8_t base_fn, uint8_t fb_mode);
+void l1s_sb_test(uint8_t base_fn);
+void l1s_pm_test(uint8_t base_fn, uint16_t arfcn);
+void l1s_nb_test(uint8_t base_fn);
+
+void l1s_fbsb_req(uint8_t base_fn, struct l1ctl_fbsb_req *req);
+void l1a_freq_req(uint32_t fn_sched);
+void l1a_rach_req(uint8_t fn51, uint8_t mf_off, uint8_t ra);
+
+/* Primitives raw scheduling sets */
+extern const struct tdma_sched_item nb_sched_set[];
+extern const struct tdma_sched_item nb_sched_set_ul[];
+
+#endif /* _L1_PRIM_H */
diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h
index 8baf5729..4d99ba0f 100644
--- a/src/target/firmware/include/layer1/sync.h
+++ b/src/target/firmware/include/layer1/sync.h
@@ -151,11 +151,6 @@ uint16_t l1s_snr_fract(uint16_t snr);
void l1s_dsp_abort(void);
-void l1s_fb_test(uint8_t base_fn, uint8_t fb_mode);
-void l1s_sb_test(uint8_t base_fn);
-void l1s_pm_test(uint8_t base_fn, uint16_t arfcn);
-void l1s_nb_test(uint8_t base_fn);
-
/* schedule a completion */
void l1s_compl_sched(enum l1_compl c);
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index 2239bfb1..2f1108f6 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -35,6 +35,7 @@
#include <layer1/sync.h>
#include <layer1/async.h>
#include <layer1/mframe_sched.h>
+#include <layer1/prim.h>
#include <layer1/tpu_window.h>
#include <rf/trf6151.h>
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index e51d7582..8e92b93c 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -28,6 +28,7 @@
#include <osmocore/gsm_utils.h>
+#include <layer1/prim.h>
#include <layer1/sync.h>
#include <layer1/tdma_sched.h>
#include <layer1/mframe_sched.h>
@@ -45,8 +46,6 @@ struct mframe_sched_item {
};
/* FIXME: properly clean this up */
-extern const struct tdma_sched_item nb_sched_set[];
-extern const struct tdma_sched_item nb_sched_set_ul[];
#define NB_QUAD_DL nb_sched_set
#define NB_QUAD_FH_DL NB_QUAD_DL
#define NB_QUAD_UL nb_sched_set_ul