FreeCalypso > hg > gsm-codec-lib
annotate libgsmhr1/rxfe_create.c @ 584:fc7a59deb3c3
hrutil: new program gsmhr-tfo-xfrm
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Feb 2025 01:34:48 +0000 |
parents | 9cda792c0dd7 |
children |
rev | line source |
---|---|
583
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * Here we implement gsmhr_rxfe_create() function: allocation of a |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * free-standing RxFE state structure, used for our TFO transform. |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdint.h> |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdlib.h> |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "tw_gsmhr.h" |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "typedefs.h" |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "namespace.h" |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include "rxfe.h" |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 struct gsmhr_rxfe_state *gsmhr_rxfe_create(void) |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 { |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 struct gsmhr_rxfe_state *st; |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 st = malloc(sizeof(struct gsmhr_rxfe_state)); |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 if (st) |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 gsmhr_rxfe_reset(st); |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 return st; |
9cda792c0dd7
libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 } |