summaryrefslogtreecommitdiffstats
path: root/Src/osmocombb/src/target/firmware/include/rffe.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/osmocombb/src/target/firmware/include/rffe.h')
-rw-r--r--Src/osmocombb/src/target/firmware/include/rffe.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/Src/osmocombb/src/target/firmware/include/rffe.h b/Src/osmocombb/src/target/firmware/include/rffe.h
new file mode 100644
index 0000000..63a3a4b
--- /dev/null
+++ b/Src/osmocombb/src/target/firmware/include/rffe.h
@@ -0,0 +1,35 @@
+#ifndef _RFFE_H
+#define _RFFE_H
+
+#include <osmocom/gsm/gsm_utils.h>
+
+extern const uint8_t system_inherent_gain;
+
+/* initialize RF Frontend */
+void rffe_init(void);
+
+/* switch RF Frontend Mode */
+void rffe_mode(enum gsm_band band, int tx);
+
+/* query RF wiring */
+enum rffe_port
+{
+ PORT_LO = 0, /* Combined 850/900 port */
+ PORT_HI = 1, /* Combined 1800/1900 port */
+ PORT_GSM850 = 2,
+ PORT_GSM900 = 3,
+ PORT_DCS1800 = 4,
+ PORT_PCS1900 = 5,
+};
+
+uint32_t rffe_get_rx_ports(void);
+uint32_t rffe_get_tx_ports(void);
+
+/* get current gain of RF frontend (anything between antenna and baseband in dBm */
+uint8_t rffe_get_gain(void);
+
+void rffe_set_gain(uint8_t dbm);
+
+void rffe_compute_gain(int16_t exp_inp, int16_t target_bb);
+
+#endif