summaryrefslogtreecommitdiff
path: root/gssm/src/lib/cch.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@openmoko.org>2008-10-13 09:02:02 +0200
committerHarald Welte <laforge@openmoko.org>2008-10-13 09:02:02 +0200
commit08f95b2ac7f377f98f83761b52027b88824d7a64 (patch)
tree08a81eabd6f4dba1f66a6190a7668087634f1916 /gssm/src/lib/cch.h
parent3f97e0be9f90c505f34afa8371c25a0ffa3e97c1 (diff)
initial import of gssm-v0.1.1a
Diffstat (limited to 'gssm/src/lib/cch.h')
-rw-r--r--gssm/src/lib/cch.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/gssm/src/lib/cch.h b/gssm/src/lib/cch.h
new file mode 100644
index 0000000..bb1d629
--- /dev/null
+++ b/gssm/src/lib/cch.h
@@ -0,0 +1,42 @@
+// $Id: cch.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $
+
+/*
+ * decode_cch
+ *
+ * Decode a "common" control channel. Most control channels use
+ * the same burst, interleave, Viterbi and parity configuration.
+ * The documentation for the control channels defines SACCH first
+ * and then just keeps referring to that.
+ *
+ * The current (investigated) list is as follows:
+ *
+ * BCCH Norm
+ * BCCH Ext
+ * PCH
+ * AGCH
+ * CBCH (SDCCH/4)
+ * CBCH (SDCCH/8)
+ * SDCCH/4
+ * SACCH/C4
+ * SDCCH/8
+ * SACCH/C8
+ *
+ * We provide two functions, one for where all four bursts are
+ * contiguous, and one where they aren't.
+ */
+
+#define DATA_BLOCK_SIZE 184
+#define PARITY_SIZE 40
+#define FLUSH_BITS_SIZE 4
+#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE)
+
+#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE
+#define CONV_SIZE (2 * CONV_INPUT_SIZE)
+
+#define BLOCKS 4
+#define iBLOCK_SIZE (CONV_SIZE / BLOCKS)
+#define eBLOCK_SIZE (iBLOCK_SIZE + 2)
+
+unsigned char *decode_cch(unsigned char *, unsigned char *, unsigned char *,
+ unsigned char *, unsigned int *);
+unsigned char *decode_cch(unsigned char *, unsigned int *);
personal git repositories of Harald Welte. Your mileage may vary