comparison src/cs/riviera/tests/rv/rv_test.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 * @file rv_test.h
3 *
4 * Definitions used by all tests in Riviera.
5 *
6 * @author Cedric Baudelet
7 * @author Vincent Oberle
8 */
9
10 /*
11 * History:
12 *
13 * Date Author Modification
14 * -------------------------------------------------------------------
15 * 10/02/00 Cedric Baudelet Create.
16 * 10/03/00 Cedric Baudelet Add UPF4 value for TEST_TYPE parameter.
17 * 10/05/00 David Lamy-Charrier Add BTCTRL value for TEST_LEVEL parameter.
18 * 10/06/00 Cedric Baudelet Add trace_test_verdict function's definition.
19 * 10/12/00 Cedric Baudelet Add possibility to set testing
20 * parameters dynamically using LCD and
21 * keypad features.
22 * 11/16/00 Cedric Baudelet Add TRACE_RVTEST traces macros.
23 * 11/21/00 Cristian Livadiotti Add xxx_return_path parameters.
24 * 11/24/00 Cedric Baudelet Update macros.
25 * 11/30/00 Cedric Baudelet Change EOL from (0xFFFF) to (0xFF).
26 * 12/08/00 Cedric Baudelet Add XXX_STATE definitions.
27 * 12/14/00 Cedric Baudelet Update DISPLAY_TEST_VERDICT_SCREEN macro.
28 * 01/11/01 Cedric Baudelet Add Flash File System (FFS) SWE.
29 * 01/12/01 Cedric Baudelet Add T_RV_TEST_INIT definition.
30 * 01/16/01 Cedric Baudelet Include 'rv_test_filter.h' file and
31 * define redirections needed to set test
32 * filter.
33 * 03/29/01 Cedric Baudelet - Updated LCD and keypad macros.
34 * - Replaced UPF4 by UPF.
35 * 07/12/01 Stephanie Gerthoux Add Audio test parameters using LCD.
36 * 10/18/01 Christophe Favergeon R2D added.
37 * 12/18/01 Vincent Oberle Changed DISPLAY_START_SCREEN,
38 * DISPLAY_TRANSITION_SCREEN and DISPLAY_TEST_VERDICT_SCREEN macros
39 * into functions.
40 * Replaced SET_STEP_PARAM macro with set_step_param function.
41 * 03/08/02 Vincent Oberle Changed SCROLL_LCD and START_APPLI into functions.
42 * 03/08/02 Vincent Oberle Passed all remaining macros into function.
43 * Comment and formating cleaning.
44 * 11/28/02 Vincent Oberle Deleted XXX lines, generated rv_test_inc.h used instead.
45 *
46 * (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved
47 */
48
49 #ifndef _RV_TEST_H_
50 #define _RV_TEST_H_
51
52 #include "rv/rv_general.h"
53 #include "rvf/rvf_api.h"
54 #include "rvm/rvm_gen.h"
55
56
57
58 #ifdef DEVICE_A
59 #define DISPLAY_DEVICE_STRING (" Device A ")
60 #endif
61 #ifdef DEVICE_B
62 #define DISPLAY_DEVICE_STRING (" Device B ")
63 #endif
64
65
66
67 /**
68 * !!! IMPORTANT !!!
69 *
70 * END OF LIST -> This flag defines the end of the list containing tests to
71 * perform (NON REGRESSION only). Lists TEST_TABLE[] (defined in rv_test_cfg.h
72 * file) and test_list_all[] (defined in rv_test_regr.c file) MUST contain
73 * this flag as their last element.
74 */
75 #define EOL (0xFF)
76
77
78 /**
79 * RV TEST -> GENERAL PARAMETERS
80 *
81 * TEST_PARAM_NOT_DEFINED is default value for a parameter not defined yet.
82 */
83 #define TEST_PARAM_NOT_DEFINED (0)
84
85
86 /**
87 * RV TEST -> TEST INIT PARAMETER
88 *
89 * TEST_INIT parameter is set in rv_test_cfg.h file.
90 */
91 typedef UINT8 T_RV_TEST_INIT;
92
93 #define COMP (1)
94 #define EXEC (2)
95
96
97 /**
98 *
99 * RV TEST -> TEST TYPE PARAMETER
100 *
101 * TEST_TYPE parameter is set in rv_test_cfg.h file.
102 */
103 typedef UINT8 T_RV_TEST_TYPE;
104
105 #define REGR (1)
106 #define CERTIF (2)
107 #define DEMO (3)
108 #define MISC (4)
109 #define UPF (5)
110
111
112 /**
113 * RV TEST -> TEST LEVEL PARAMETER
114 *
115 * TEST_LEVEL parameter is set in rv_test_cfg.h file.
116 * Values from rv_test_inc.h are used.
117 */
118 typedef UINT8 T_RV_TEST_LEVEL;
119
120
121
122 /**
123 * RV TEST -> TEST AUDIO PARAMETER
124 *
125 * TEST_AUDIO parameter is set in rv_test_cfg.h file.
126 */
127 typedef UINT8 T_RV_TEST_AUDIO;
128
129 #define LIST (1)
130 #define ONESHOT (2)
131
132
133 /**
134 * RV TEST -> TEST AUDIO SERVICES PARAMETER
135 *
136 * TEST_AUDIO_ SERVICES parameter is set in rv_test_cfg.h file.
137 */
138 typedef UINT8 T_RV_TEST_AUDIO_SERVICES;
139
140 #define KBEEP (1)
141 #define TRITONE (2)
142 #define MELO (3)
143
144
145 /**
146 * RV TEST -> TEST NUMBER PARAMETER
147 *
148 * TEST_NUMBER parameter is set in rv_test_cfg.h file.
149 */
150 typedef UINT16 T_RV_TEST_NBR;
151
152
153 /**
154 * RV TEST -> ERROR TYPE PARAMETER
155 */
156 typedef enum {
157 NO_ERR = 0, /* No error occurs */
158 NO_EVENT_RECV = -2, /* Received no event */
159 BAD_EVENT_RECV = -3, /* Received event not waited */
160 EVENT_PARAM_ERROR = -4, /* Received event -> parameter not waited */
161 FUNCTION_ERROR = -5, /* A function has been called and 0 -> returned an error */
162 DATA_ERROR = -9, /* An error has been found in the RX or TX data */
163 MEMORY_ERROR = -10 /* A memory error occurs */
164 } T_RV_TEST_ERR_TYPE;
165
166
167 /**
168 * RV TEST -> RETURN PARAMETER
169 */
170 typedef enum {
171 TEST_PASSED = 0, /* No error occurs */
172 TEST_FAILED = -2, /* An error occurs -> continu test suite */
173 TEST_IRRECOVERABLY_FAILED = -3 /* An error occurs -> stop test suite */
174 } T_RV_TEST_RET;
175
176
177 /**
178 * BT DEVICES
179 *
180 * Notes: bd_addr are set in rv_test_cfg.h file.
181 */
182 /*
183 extern T_BD_ADDR bd_addr_loc; /* bd_addr of the LOCAL device
184 extern T_BD_ADDR bd_addr_rem; /* bd_addr of the REMOTE device
185 */
186
187 /**
188 * RETURN PATHS
189 *
190 * Notes: Return paths are used to send messages to layers. These parameters are
191 * initialized at the start of each test.
192 */
193 extern T_RV_RETURN_PATH rv_test_g_l2cap_return_path;
194 extern T_RV_RETURN_PATH rv_test_g_sdp_return_path;
195 extern T_RV_RETURN_PATH rv_test_g_rfc_return_path;
196
197
198
199
200
201
202
203
204 /*************
205 * FUNCTIONS *
206 *************/
207
208 /**
209 * This task is started from Application_Initialize and
210 * calls the test main function depending on test type.
211 */
212 void rv_test (UINT32 p);
213
214
215 /**
216 * Gets memory banks for the tests.
217 */
218 T_RV_RET rv_test_mb_init (T_RVF_MB_ID mbIds[]);
219
220
221 /**
222 * Trace verdict of the performed test depending on test_verdict parameter's
223 */
224 void trace_test_verdict (T_RV_TEST_RET test_verdict);
225
226
227 /**
228 * Start the specified SWE.
229 * Originaly the START_APPLI macros.
230 *
231 * @param swe_use_id SWE USE ID.
232 */
233 void rv_test_start_swe (T_RVM_USE_ID swe_use_id);
234
235
236
237
238
239 /**
240 * RV_TEST_TRACE_XXX(_PARAM) macros.
241 *
242 * Handle TRACE_RVTEST TRACE_TYPE traces, with or without parameter.
243 */
244 /*@{*/
245 #define RV_TEST_TRACE(string, level) { \
246 rvf_send_trace((string), sizeof(string) - 1, NULL_PARAM, level, TRACE_RVTEST); }
247
248 #define RV_TEST_TRACE_PARAM(string, param, level) { \
249 rvf_send_trace((string), sizeof(string) - 1, param, level, TRACE_RVTEST); }
250
251 #define RV_TEST_TRACE_ERROR(string) { \
252 rvf_send_trace((string), sizeof(string) - 1, NULL_PARAM, RV_TRACE_LEVEL_ERROR, TRACE_RVTEST); }
253
254 #define RV_TEST_TRACE_ERROR_PARAM(string, param) { \
255 rvf_send_trace((string), sizeof(string) - 1, param, RV_TRACE_LEVEL_ERROR, TRACE_RVTEST); }
256
257 #define RV_TEST_TRACE_WARNING(string) { \
258 rvf_send_trace((string), sizeof (string) - 1, NULL_PARAM, RV_TRACE_LEVEL_WARNING, TRACE_RVTEST); }
259
260 #define RV_TEST_TRACE_WARNING_PARAM(string, param) { \
261 rvf_send_trace((string), sizeof(string) - 1, param, RV_TRACE_LEVEL_WARNING, TRACE_RVTEST); }
262
263 #define RV_TEST_TRACE_HIGH(string) { \
264 rvf_send_trace((string), sizeof(string) - 1, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, TRACE_RVTEST); }
265
266 #define RV_TEST_TRACE_HIGH_PARAM(string, param) { \
267 rvf_send_trace((string), sizeof(string) - 1, param, RV_TRACE_LEVEL_DEBUG_HIGH, TRACE_RVTEST); }
268
269 #define RV_TEST_TRACE_MEDIUM(string) { \
270 rvf_send_trace((string), sizeof(string) - 1, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_MEDIUM, TRACE_RVTEST); }
271
272 #define RV_TEST_TRACE_MEDIUM_PARAM(string, param) { \
273 rvf_send_trace((string), sizeof(string) - 1, param, RV_TRACE_LEVEL_DEBUG_MEDIUM, TRACE_RVTEST); }
274
275 #define RV_TEST_TRACE_LOW(string) { \
276 rvf_send_trace((string), sizeof(string) - 1, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_LOW, TRACE_RVTEST); }
277
278 #define RV_TEST_TRACE_LOW_PARAM(string, param) { \
279 rvf_send_trace((string), sizeof(string) - 1, param, RV_TRACE_LEVEL_DEBUG_LOW, TRACE_RVTEST); }
280 /*@}*/
281
282
283
284 #endif /* _RV_TEST_H_ */