changeset 496:af70bf42eb1b

libgsmhr1: implement DHF const array
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 18 Jun 2024 00:15:46 +0000
parents aee13079db3c
children a1599eaf51f9
files libgsmhr1/Makefile libgsmhr1/dhf_params.c libgsmhr1/tw_gsmhr.h
diffstat 3 files changed, 33 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmhr1/Makefile	Mon Jun 17 23:25:19 2024 +0000
+++ b/libgsmhr1/Makefile	Tue Jun 18 00:15:46 2024 +0000
@@ -1,5 +1,5 @@
-OBJS=	pack_frame.o rtp_in.o sid_detect.o sid_reset.o twts002_in.o \
-	twts002_out.o unpack_frame.o
+OBJS=	dhf_params.o pack_frame.o rtp_in.o sid_detect.o sid_reset.o \
+	twts002_in.o twts002_out.o unpack_frame.o
 HDRS=	tw_gsmhr.h
 LIB=	libgsmhr1.a
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgsmhr1/dhf_params.c	Tue Jun 18 00:15:46 2024 +0000
@@ -0,0 +1,28 @@
+/*
+ * This module holds a public const datum: the broken-down parameters
+ * form of HRv1 decoder homing frame (DHF).
+ */
+
+#include <stdint.h>
+#include "tw_gsmhr.h"
+
+const int16_t gsmhr_dhf_params[GSMHR_NUM_PARAMS] = {
+    0x0000,                            /* R0      */
+    0x0371,                            /* LPC1    */
+    0x015E,                            /* LPC2    */
+    0x00c3,                            /* LPC3    */
+    0x0001,                            /* INT_LPC */
+    0x0000,                            /* MODE    */
+    0x0047,                            /* CODE1_1 */
+    0x004a,                            /* CODE2_1 */
+    0x0000,                            /* GSP0_1  */
+    0x0009,                            /* CODE1_2 */
+    0x0026,                            /* CODE2_2 */
+    0x0007,                            /* GSP0_2  */
+    0x0000,                            /* CODE1_3 */
+    0x0000,                            /* CODE2_3 */
+    0x0000,                            /* GSP0_3  */
+    0x0000,                            /* CODE1_4 */
+    0x0000,                            /* CODE2_4 */
+    0x0000                             /* GSP0_4  */
+};
--- a/libgsmhr1/tw_gsmhr.h	Mon Jun 17 23:25:19 2024 +0000
+++ b/libgsmhr1/tw_gsmhr.h	Tue Jun 18 00:15:46 2024 +0000
@@ -54,8 +54,9 @@
 int gsmhr_ts101318_is_perfect_sid(const uint8_t *payload);
 void gsmhr_ts101318_set_sid_codeword(uint8_t *payload);
 
-/* public const data item */
+/* public const data items */
 
-extern const int16_t gsmhr_decoder_homing_frame[GSMHR_NUM_PARAMS];
+extern const int16_t gsmhr_dhf_params[GSMHR_NUM_PARAMS];
+extern const uint8_t gsmhr_dhf_ts101318[GSMHR_FRAME_LEN_RPF];
 
 #endif	/* include guard */