FreeCalypso > hg > tcs211-c139
comparison chipsetsw/layer1/gtt_include/ctm/tonemod.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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 * Changes since October 13, 2000: | |
13 * - The type mod_state_t includes a new member txbits_fifo_state now. | |
14 * | |
15 ******************************************************************************* | |
16 * | |
17 * File : tonemod.h | |
18 * Purpose : header file for tonemod.c | |
19 * | |
20 ******************************************************************************* | |
21 */ | |
22 | |
23 #ifndef tonemod_h | |
24 #define tonemod_h "$Id: $" | |
25 | |
26 /* | |
27 ******************************************************************************* | |
28 * INCLUDE FILES | |
29 ******************************************************************************* | |
30 */ | |
31 | |
32 #include <fifo.h> | |
33 | |
34 /* | |
35 ******************************************************************************* | |
36 * DECLARATION OF PROTOTYPES | |
37 ******************************************************************************* | |
38 */ | |
39 | |
40 | |
41 /* Define a type for the state variable of the function tonemod() */ | |
42 | |
43 typedef struct { | |
44 WORD16 cntModulatedSamples; | |
45 WORD16 actualBits[2]; | |
46 fifo_state_t txbits_fifo_state; | |
47 } mod_state_t; | |
48 | |
49 | |
50 /* ---------------------------------------------------------------------- */ | |
51 /* Function init_tonemod() */ | |
52 /* *********************** */ | |
53 /* This function has to be executed before tonemod() can be used. */ | |
54 /* ---------------------------------------------------------------------- */ | |
55 | |
56 void init_tonemod(mod_state_t *mod_state); | |
57 | |
58 | |
59 /* ---------------------------------------------------------------------- */ | |
60 /* Function tonemod() */ | |
61 /* ****************** */ | |
62 /* Modulator of the Cellular Text Telephone Modem. */ | |
63 /* The input vector bits_in must contain the bits that have to be */ | |
64 /* transmitted. The length of bits_in must be even because always two */ | |
65 /* bits are coded in parallel. */ | |
66 /* Bits are either unipolar (i.e. {0, 1}) or bipolar (i.e. {-1, +1)}. */ | |
67 /* The length of the output vector tones_out must be 20 times longer than */ | |
68 /* the length of bits_in, since each pair of two bits is coded within a */ | |
69 /* frame of 40 audio samples. */ | |
70 /* ---------------------------------------------------------------------- */ | |
71 | |
72 void tonemod(WORD16 *tones_out, | |
73 WORD16 *bits_in, | |
74 WORD16 num_samples_tones_out, | |
75 WORD16 num_bits_in, | |
76 mod_state_t *mod_state); | |
77 | |
78 #endif |