aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding_scheme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding_scheme.c')
-rw-r--r--src/coding_scheme.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/coding_scheme.c b/src/coding_scheme.c
index 4a5d0d4..a4ae882 100644
--- a/src/coding_scheme.c
+++ b/src/coding_scheme.c
@@ -64,6 +64,19 @@ bool mcs_is_edge_gmsk(enum CodingScheme cs)
return false;
}
+/* Return 3GPP TS 44.060 ยง12.10d (EDGE) or Table 11.2.28.2 (GPRS) Channel Coding Command value */
+uint8_t mcs_chan_code(enum CodingScheme cs)
+{
+ if (mcs_is_gprs(cs))
+ return cs - CS1;
+
+ if (mcs_is_edge(cs))
+ return cs - MCS1;
+
+ /* Defaults to (M)CS1 */
+ return 0;
+}
+
static struct {
struct {
uint8_t data_header_bits;