summaryrefslogtreecommitdiffstats
path: root/src/host/gprsdecode/gprs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/gprsdecode/gprs.h')
-rw-r--r--src/host/gprsdecode/gprs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/host/gprsdecode/gprs.h b/src/host/gprsdecode/gprs.h
new file mode 100644
index 00000000..1147d543
--- /dev/null
+++ b/src/host/gprsdecode/gprs.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define GSM_BURST_PL_LEN 116
+#define GPRS_BURST_PL_LEN GSM_BURST_PL_LEN
+
+#define MEAS_AVG(meas) \
+ ((meas[0] + meas[1] + meas[2] + meas[3]) / 4)
+
+/* Burst decoder state */
+struct burst_buf {
+ unsigned snr[4];
+ unsigned rxl[4];
+ unsigned errors;
+ unsigned count;
+
+ sbit_t bursts[GSM_BURST_PL_LEN * 4];
+ uint32_t fn_first;
+};
+
+int process_pdch(struct l1ctl_burst_ind *bi, bool verbose);