FreeCalypso > hg > fc-magnetite
comparison src/cs/riviera/tests/rtest/rtest_api.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 rtest_api.h | |
3 * | |
4 * API Definition for the RTEST SWE. | |
5 * | |
6 * Please not the distinction that is made from where the API | |
7 * functions can be called: | |
8 * - from the test task only | |
9 * - from RTEST only | |
10 * - from both | |
11 * | |
12 * @author Vincent Oberle (v-oberle@ti.com) | |
13 * @version 0.1 | |
14 */ | |
15 | |
16 /* | |
17 * History: | |
18 * | |
19 * Date Modification | |
20 * ------------------------------------ | |
21 * 11/21/2001 Create | |
22 * 03/04/2002 Changed name to RTEST | |
23 * | |
24 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | |
25 */ | |
26 | |
27 #ifndef __RTEST_API_H_ | |
28 #define __RTEST_API_H_ | |
29 | |
30 | |
31 #include "rvm/rvm_gen.h" /* Generic RVM types and functions. */ | |
32 | |
33 #include "tests/rv/rv_test_certif.h" | |
34 #include "tests/rv/rv_test_demo.h" | |
35 #include "tests/rv/rv_test_regr.h" | |
36 #include "tests/rv/rv_test_misc.h" | |
37 | |
38 | |
39 /** | |
40 * Type for the test function pointers. | |
41 */ | |
42 typedef void (*T_RTEST_FUNC) (void); | |
43 | |
44 | |
45 /** FROM TEST TASK ONLY **/ | |
46 | |
47 /** | |
48 * Starts a test. | |
49 * | |
50 * This function is called by the test task (ie the task to which | |
51 * the main gives the hand). It BLOCKS until a RTEST_TEST_RESULT message | |
52 * is received. | |
53 * | |
54 * Usage: | |
55 * To be called from the test task only, not from RTEST! | |
56 * | |
57 * @param test_fct Test function. | |
58 * @return Result of the test. | |
59 */ | |
60 T_RV_TEST_RET rtest_start_test(T_RTEST_FUNC test_fct); | |
61 | |
62 | |
63 /** FROM TEST TASK AND RNET **/ | |
64 | |
65 /** | |
66 * Sets up the RTEST SWE to forward the messages that are not | |
67 * RTEST messages to another handle_message function. | |
68 * | |
69 * Usage: | |
70 * Can be called from outside and from inside RTEST. | |
71 * | |
72 * @param hm handle_message function to forward the messages to. | |
73 */ | |
74 void rtest_set_swe_handle_message (T_RVM_RETURN (* hm) (T_RV_HDR*)); | |
75 | |
76 /** | |
77 * Sets up the RTEST SWE to forward the timers to another | |
78 * handle_timer function. | |
79 * | |
80 * Usage: | |
81 * Can be called from outside and from inside RTEST. | |
82 * | |
83 * @param ht handle_timer function to forward the timers to. | |
84 */ | |
85 void rtest_set_swe_handle_timer (T_RVM_RETURN (* ht) (T_RV_HDR*)); | |
86 | |
87 | |
88 /** | |
89 * Trace information on the verdict (result) of a test. | |
90 * | |
91 * Usage: | |
92 * Can be called from outside and from inside RTEST. | |
93 * | |
94 * @param test_verdict Result of the test. | |
95 */ | |
96 void rtest_trace_test_verdict (T_RV_TEST_RET test_verdict); | |
97 | |
98 | |
99 /** FROM RNET ONLY **/ | |
100 | |
101 /** | |
102 * Sends the test result back to the test task. | |
103 * | |
104 * This function is to be used by a test when finished. It will | |
105 * unblock the test_start_xxx functions. | |
106 * | |
107 * Usage: | |
108 * To be called from RTEST only! | |
109 * | |
110 * @param result The result of the test. | |
111 * @return RV_MEMORY_ERR or RV_INTERNAL_ERR if there was a problem | |
112 * to send the message, RV_OK otherwise. | |
113 */ | |
114 T_RV_RET rtest_send_result (T_RV_TEST_RET result); | |
115 | |
116 | |
117 /** | |
118 * Returns the address ID of the RTEST SWE. | |
119 * | |
120 * Usage: | |
121 * To be called from RTEST only! | |
122 * | |
123 * @return Address ID of RTEST. | |
124 */ | |
125 T_RVF_ADDR_ID rtest_get_addr_id (void); | |
126 | |
127 /** | |
128 * Returns the MB ID of the RTEST SWE. | |
129 * | |
130 * Usage: | |
131 * To be called from RTEST only! | |
132 * | |
133 * @return Memory bank ID of RTEST | |
134 */ | |
135 T_RVF_MB_ID rtest_get_mb_id (void); | |
136 | |
137 | |
138 /** | |
139 * Blocks RTEST waiting for a message. | |
140 * | |
141 * If the parameter msg_id is not null, the function blocks until receiving | |
142 * a message with the same ID, DISCARDING all other messages. | |
143 * If the parameter msg_id is null, the function returns the first message received. | |
144 * | |
145 * Usage: | |
146 * To be called from RTEST only! | |
147 * | |
148 * @param msg_id Waited message ID, null for any message. | |
149 * @return The received message. | |
150 */ | |
151 T_RV_HDR * rtest_wait_for_message (UINT32 msg_id); | |
152 | |
153 | |
154 #endif /*__RTEST_API_H_*/ | |
155 |