changeset 583:9cda792c0dd7

libgsmhr1: implement RxFE state allocation
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 Feb 2025 23:43:40 +0000
parents 7d0e565aa1ae
children fc7a59deb3c3
files libgsmhr1/Makefile libgsmhr1/rxfe_create.c
diffstat 2 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmhr1/Makefile	Thu Feb 13 23:24:17 2025 +0000
+++ b/libgsmhr1/Makefile	Thu Feb 13 23:43:40 2025 +0000
@@ -1,7 +1,8 @@
 OBJS=	dhf_packed.o dhf_params.o dtx_rxfe.o enc_out_order.o mathdp31.o \
 	mathhalf.o pack_frame.o paramval_cod.o paramval_common.o paramval_dec.o\
-	rtp_in.o rtp_in_direct.o rxfe.o sid_cw_params.o sid_detect.o \
-	sid_reset.o sp_rom.o tfo.o twts002_in.o twts002_out.o unpack_frame.o
+	rtp_in.o rtp_in_direct.o rxfe.o rxfe_create.o sid_cw_params.o \
+	sid_detect.o sid_reset.o sp_rom.o tfo.o twts002_in.o twts002_out.o \
+	unpack_frame.o
 HDRS=	dtx_const.h dtx_rxfe.h enc_out_order.h mathdp31.h mathhalf.h \
 	namespace.h rxfe.h sp_rom.h tw_gsmhr.h typedefs.h
 LIB=	libgsmhr1.a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgsmhr1/rxfe_create.c	Thu Feb 13 23:43:40 2025 +0000
@@ -0,0 +1,21 @@
+/*
+ * Here we implement gsmhr_rxfe_create() function: allocation of a
+ * free-standing RxFE state structure, used for our TFO transform.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "tw_gsmhr.h"
+#include "typedefs.h"
+#include "namespace.h"
+#include "rxfe.h"
+
+struct gsmhr_rxfe_state *gsmhr_rxfe_create(void)
+{
+	struct gsmhr_rxfe_state *st;
+
+	st = malloc(sizeof(struct gsmhr_rxfe_state));
+	if (st)
+		gsmhr_rxfe_reset(st);
+	return st;
+}