FreeCalypso > hg > tcs211-c139
comparison chipsetsw/services/cst/cst.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 | PROJECT : XXX SOURCE : CST.H | | |
4 | AUTHOR : XXX VERSION: 1.0 | | |
5 | CREATED : 01.02.99 STATE : code | | |
6 +--------------------------------------------------------------------+ | |
7 | |
8 MODULE : CST | |
9 | |
10 PURPOSE : Definitions for the protocol stack entity CST. | |
11 */ | |
12 | |
13 #ifndef CST_H | |
14 #define CST_H | |
15 | |
16 #include "config/swconfig.cfg" | |
17 #include "config/chipset.cfg" | |
18 | |
19 /*==== TEST =====================================================*/ | |
20 | |
21 /* | |
22 * Dynamic Configuration Numbers | |
23 */ | |
24 #define ID_CONFIG 1 | |
25 #define ID_MUTE 2 | |
26 #define ID_GSM_PARAMETERS 11 | |
27 #define ID_L1_PARAMETERS 12 | |
28 | |
29 /* | |
30 * TIMER IDs | |
31 */ | |
32 #define T_RX 0 /* request of fieldstrength */ | |
33 #define TMAX 0 /* must be the last one */ | |
34 | |
35 /* | |
36 * Configuration Parameter | |
37 */ | |
38 #define TCST1 0 | |
39 #define TCST2 1 | |
40 | |
41 | |
42 #if (CHIPSET == 0) | |
43 #define ARMIO_CLK 0x0001 | |
44 #define RIF_CLKR 0x0002 | |
45 #define RIF_CLKX 0x0004 | |
46 #define RIF_CLK13 0x0010 | |
47 #define UWIRE_CLK 0x0020 | |
48 #define SIM_CLK 0x0040 | |
49 #define TSP_CLK 0x0080 | |
50 #define UART_CLK 0x0400 | |
51 #endif | |
52 | |
53 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 4) || \ | |
54 (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || \ | |
55 (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || \ | |
56 (CHIPSET == 11) || (CHIPSET == 12)) | |
57 #define ARMIO_CLK_CUT 0x0001 | |
58 #define UWIRE_CLK_CUT 0x0002 | |
59 #endif | |
60 | |
61 // ADC timer expiration value defining the ADC period | |
62 // with new frame all timer values are in ms not in tdma frames one TDMA approx 4.615 ms | |
63 #define ADC_PERIOD 4615 | |
64 | |
65 #ifdef ALR | |
66 //#define VM_BUFFER_SIZE 10240 // 10 seconds (1024 words for about 1 second of recording) | |
67 #endif | |
68 | |
69 | |
70 typedef struct | |
71 { | |
72 UBYTE t_mode; | |
73 ULONG t_val; | |
74 } T_TIMER_CONFIG; | |
75 | |
76 #ifdef OPTION_TIMER | |
77 #define CST_TSTART(i,h,v) tim_start_timer(i,h,v) | |
78 #else | |
79 #define CST_TSTART(i,h,v) vsi_t_start(VSI_CALLER h,v) | |
80 #endif | |
81 | |
82 #define TIMERSTART(i,v,h) csf_alloc_timer(i,v,&h) | |
83 #define TIMERSTOP(h) csf_free_timer(h); h = VSI_ERROR; | |
84 | |
85 /*==== EXPORT =====================================================*/ | |
86 /* | |
87 * CST global data declarations | |
88 */ | |
89 | |
90 #define CST_ADC_TIMER 0 | |
91 | |
92 /* | |
93 * Prototypes Timer Modul | |
94 */ | |
95 /* | |
96 * If all entities are linked into one module this definitions | |
97 * prefixes all this functions with the enity name | |
98 */ | |
99 #ifdef OPTION_MULTITHREAD | |
100 #define tim_init_timer _ENTITY_PREFIXED(tim_init_timer) | |
101 #define tim_set_timeout_flag _ENTITY_PREFIXED(tim_set_timeout_flag) | |
102 #define tim_handle_timeout _ENTITY_PREFIXED(tim_handle_timeout) | |
103 #define tim_config_timer _ENTITY_PREFIXED(tim_config_timer) | |
104 #define tim_get_config_timer _ENTITY_PREFIXED(tim_get_config_timer) | |
105 #define tim_start_timer _ENTITY_PREFIXED(tim_start_timer) | |
106 #define tim_flush_fifo _ENTITY_PREFIXED(tim_flush_fifo) | |
107 #endif | |
108 | |
109 #ifdef OPTION_TIMER | |
110 /* | |
111 * If all entities are linked into one module this definitions | |
112 * prefixes the global data with the entity name | |
113 */ | |
114 #ifdef OPTION_MULTITHREAD | |
115 #define partab _ENTITY_PREFIXED(partab) | |
116 #endif | |
117 | |
118 EXTERN KW_DATA partab[]; | |
119 #endif | |
120 | |
121 /* | |
122 * If all entities are linked into one module this definitions | |
123 * prefixes the global data with the enity name | |
124 */ | |
125 #ifdef OPTION_MULTITHREAD | |
126 #define hCommPL _ENTITY_PREFIXED(hCommPL) | |
127 #define hCommL1 _ENTITY_PREFIXED(hCommL1) | |
128 #endif | |
129 | |
130 EXTERN T_HANDLE hCommPL; /* Communication to TI++ */ | |
131 EXTERN T_HANDLE hCommL1; /* Communication to Layer 1 */ | |
132 EXTERN T_HANDLE cst_handle; | |
133 | |
134 /* | |
135 * Prototypes Customer Spefific Functions Modul | |
136 */ | |
137 /* | |
138 * If all entities are linked into one module this definitions | |
139 * prefixes all this functions with the enity name | |
140 */ | |
141 GLOBAL void csf_adc_process (T_CST_ADC_IND *adc_results); | |
142 EXTERN void adc_start (void); | |
143 EXTERN void power_down_config (UBYTE sleep_mode, USHORT clocks); | |
144 GLOBAL void csf_aec_enable (USHORT aec_ctrl_reg); | |
145 | |
146 #endif // CST_H | |
147 |