FreeCalypso > hg > tcs211-c139
comparison chipsetsw/layer1/gtt_include/ctm/ctm_defines.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 ******************************************************************************* | |
13 * | |
14 * File : ctm_defines.h | |
15 * Purpose : Global constants for the Cellular Text Telephone Modem | |
16 * | |
17 ******************************************************************************* | |
18 */ | |
19 #ifndef ctm_defines_h | |
20 #define ctm_defines_h "$Id: $" | |
21 | |
22 #ifndef MAX | |
23 #define MAX(A, B) ((A) > (B) ? (A) : (B)) | |
24 #endif | |
25 | |
26 #define MAX_IDLE_SYMB 5 /* Number of Idle Symbols at End of Burst */ | |
27 #define CHC_RATE 4 /* Rate of the Error Protection */ | |
28 #define CHC_K 5 /* Constraint length of Error Protection */ | |
29 #define SYMB_LEN 40 /* Length of one CTM symbol */ | |
30 | |
31 /* The following constant determines whether the signal processing takes */ | |
32 /* place sample-by-sample or frame-by-frame (160 samples per frame) */ | |
33 // #define LENGTH_TONE_VEC 160 /* signal frame size */ | |
34 #define LENGTH_TONE_VEC 1 /* signal frame size */ | |
35 | |
36 /* Number of bits that are processed during each call of the main loop */ | |
37 //LN March 13, 2002 | |
38 //#define LENGTH_TX_BITS MAX(2, 2*LENGTH_TONE_VEC/SYMB_LEN) | |
39 #define LENGTH_TX_BITS 2 | |
40 //LN | |
41 | |
42 #define BITS_PER_SYMB 8 /* bits per symbol */ | |
43 | |
44 #define NCYCLES_0 2 /* Number of periods for symbol #0 */ | |
45 #define NCYCLES_1 3 /* Number of periods for symbol #1 */ | |
46 #define NCYCLES_2 4 /* Number of periods for symbol #2 */ | |
47 #define NCYCLES_3 5 /* Number of periods for symbol #3 */ | |
48 | |
49 #define THRESHOLD_RELIABILITY_FOR_SUPPRESSING_OUTPUT 100 | |
50 #define THRESHOLD_RELIABILITY_FOR_XCORR 1 | |
51 #define THRESHOLD_RELIABILITY_FOR_GOING_OFFLINE 100 | |
52 #define MAX_NUM_UNRELIABLE_GROSS_BITS 400 | |
53 | |
54 #define NUM_BITS_GUARD_INTERVAL 6 /* length of silence after a burst */ | |
55 | |
56 #define WAIT_SYNC_REL_THRESHOLD_0 20316 /* = 0.62*32768 */ | |
57 #define WAIT_SYNC_REL_THRESHOLD_1 17039 /* = 0.52*32768 */ | |
58 #define WAIT_SYNC_REL_THRESHOLD_2 23265 /* = 0.71*32768 */ | |
59 #define RESYNC_REL_THRESHOLD 26542 /* = 0.81*32768 */ | |
60 | |
61 #define GUARD_BIT_SYMBOL 0 /* "magic number" indicating that a */ | |
62 // /* bit shall be muted */ | |
63 | |
64 #define intlvB 8 /* Interleaver block length */ | |
65 #define intlvD 2 /* Interleaver block distance (interlace) */ | |
66 | |
67 #define demodSyncLns 1 /* Nr of demodulator sync lines */ | |
68 #define deintSyncLns 0 /* Nr of deinterleaver sync lines */ | |
69 | |
70 #define IDLE_SYMB 0x16 /* UCS code for Idle Symbol */ | |
71 #define ENQU_SYMB 0x05 /* UCS code for Enquiry Symbol */ | |
72 | |
73 #if LENGTH_TONE_VEC==160 | |
74 #define ENQUIRY_TIMEOUT 20 /* number of frames for negotiation */ | |
75 #else | |
76 #define ENQUIRY_TIMEOUT (1320/5) //19*160 | |
77 #endif | |
78 | |
79 #define NUM_ENQUIRY_BURSTS 3 /* number of enquiry attempts */ | |
80 | |
81 #define NUM_MUTE_ROWS 4 /* duration of muting interval, 4 rows=80ms */ | |
82 #define RESYNC_SEQ_LENGTH 32 /* must be a multiple of intlvB */ | |
83 | |
84 #define NUM_BITS_BETWEEN_RESYNC 352 // 352 = 320+32 | |
85 /* 352 is a multiple of CHC_RATE, intlvB, and BITS_PER_SYMB, */ | |
86 /* and must be greater than intlvB*((intlvB-1)*intlvD+NUM_MUTE_ROWS */ | |
87 | |
88 #define SILENCE_PERIOD 32 | |
89 #define EARLY_SILENCE_PERIOD SILENCE_PERIOD-2 | |
90 #define LATE_SILENCE_PERIOD SILENCE_PERIOD+2 | |
91 #define PLAYBACK_VOLUME 0xC000 /* volume for sound card playback */ | |
92 | |
93 //#define DEBUG_OUTPUT /* comment this out for regular operation mode! */ | |
94 | |
95 #endif |