comparison src/cs/layer1/gtt_include/ctm/ctm_transmitter.h @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1 /*
2 *******************************************************************************
3 *
4 * COPYRIGHT (C) 2000 BY ERICSSON EUROLAB DEUTSCHLAND GmbH
5 * 90411 NUERNBERG, GERMANY, Tel Int + 49 911 5217 100
6 *
7 * The program(s) may be used and/or copied only with the
8 * written permission from Ericsson or in accordance
9 * with the terms and conditions stipulated in the agreement or
10 * contract under which the program(s) have been supplied.
11 *
12 *******************************************************************************
13 *
14 * File : ctm_transmitter.h
15 * Author : EEDN/RV Matthias Doerbecker
16 * Tested Platforms : Sun Solaris, Windows NT 4.0
17 * Description : header file for ctm_transmitter.c
18 *
19 * Changes since October 13, 2000:
20 * - added reset function reset_ctm_transmitter()
21 *
22 * $Log: $
23 *
24 *******************************************************************************
25 */
26 #ifndef ctm_transmitter_h
27 #define ctm_transmitter_h "$Id: $"
28
29 /*
30 *******************************************************************************
31 * INCLUDE FILES
32 *******************************************************************************
33 */
34
35 #include "ctm_typedefs.h"
36 #include "ctm_defines.h"
37 #include "init_interleaver.h"
38 #include "tonemod.h"
39 #include "conv_poly.h"
40 #include "fifo.h"
41
42 /* ******************************************************************/
43 /* Type definitions for variables that contain all states of the */
44 /* CTM Transmitter */
45 /* ******************************************************************/
46
47 typedef struct {
48 BOOL burstActive;
49 WORD16 cntIdleSymbols;
50 WORD16 cntEncBitsInCurrentBlock;
51 WORD16 cntTXBitsInCurrentBlock;
52
53 /* vectors (not to be allocated) */
54 WORD16 resync_sequence[RESYNC_SEQ_LENGTH];
55
56 #if (NUM_MUTE_ROWS>0)
57 WORD16 mutePositions[intlvB*NUM_MUTE_ROWS];
58 #else
59 WORD16 mutePositions[1];
60 #endif
61
62 fifo_state_t fifo_state;
63 fifo_state_t octet_fifo_state;
64 interleaver_state_t diag_int_state;
65 conv_encoder_t conv_enc_state;
66 } tx_state_t;
67
68
69
70 /***********************************************************************/
71 /* init_ctm_transmitter() */
72 /* ********************** */
73 /* Initialization of the CTM Transmitter */
74 /* */
75 /* output vaiables: */
76 /* tx_state : pointer to a variable of tx_state_t containing the */
77 /* initialized states of the receiver */
78 /***********************************************************************/
79
80 void init_ctm_transmitter(tx_state_t* tx_state);
81 /*
82 ***********************************************************************
83 * Shutdown_ctm_transmitter() *
84 * ********************** *
85 * Shutdown of the Cellular Text Telephone Modem transmitter and *
86 * deallocate memory used by the CTM Tx buffers. *
87 * *
88 * Input variables: *
89 * tx_state : pointer to a variable of tx_state_t containing the *
90 * initialized states of the transmitter. *
91 ***********************************************************************
92 */
93 void Shutdown_ctm_transmitter(tx_state_t* tx_state);
94
95 /*
96 ***********************************************************************
97 * reset_ctm_transmitter() *
98 * ********************** *
99 * Reset of the Cellular Text Telephone Modem transmitter, state *
100 * machines and buffer pointers. *
101 * *
102 * Input variables: *
103 * tx_state : pointer to a variable of tx_state_t containing the *
104 * initialized states of the transmitter. *
105 ***********************************************************************
106 */
107 void reset_ctm_transmitter(tx_state_t* tx_state);
108
109
110 /***********************************************************************/
111 /* ctm_transmitter() */
112 /* ***************** */
113 /* Runs the Cellular Text Telephone Modem (CTM) Transmitter for a */
114 /* block of 160 output samples, representing 8 gross bits. */
115 /* The bits, which are modulated into tones, are taken from an */
116 /* internal fifo buffer. If the fifo buffer is empty, zero-valued */
117 /* samples are generated. The fifo buffer is filled with */
118 /* channel-encoded and interlaeved bits, which are generated */
119 /* internally by coding the actual input character. With each call of */
120 /* this function one or less input characters can be coded. If there */
121 /* is no character to for transmission, one of the following code has */
122 /* be used: */
123 /* - 0xFFFF: indicates that there is no character to transmit and */
124 /* that the transmitter should stay in idle mode, if it is */
125 /* currently already in idle mode. If the transmitter is */
126 /* NOT in idle mode, it might generate <IDLE> symbols in */
127 /* to keep an active burst running. The CTM burst is */
128 /* terminated if five <IDLE> symbols have been generated */
129 /* consecutevely. */
130 /* */
131 /* - 0xFFFE: although there is no character to transmit, a CTM burst */
132 /* is initiated in order to signalize to the far-end side */
133 /* that CTM is supported. The burst starts with the <IDLE> */
134 /* symbol and will be contiued with <IDLE> symbols if there */
135 /* are no regular characters handed over during the next */
136 /* calls of this function. The CTM burst is terminated if */
137 /* five <IDLE> symbols have been transmitted consecutevely. */
138 /* */
139 /* In order to avoid an overflow of the internal fifo buffer, the */
140 /* variable *ptrNumBitsStillToModulate should be checked before */
141 /* calling this function. */
142 /* */
143 /* input variables: */
144 /* ucsCode UCS code of the character */
145 /* or one of the codes 0xFFFF or 0xFFFE */
146 /* sineOutput must be false in regular mode; if true, */
147 /* a pure sine output signal is generated */
148 /* output variables: */
149 /* txToneVec output signal (vector of 160 samples) */
150 /* input/output variables: */
151 /* tx_state pointer to the variable containing the */
152 /* transmitter states */
153 /***********************************************************************/
154
155 void ctm_transmitter(UWORD16 ucsCode,
156 fifo_state_t* ctmCodeOutputVec,
157 tx_state_t* tx_state );
158
159 #endif