FreeCalypso > hg > fc-magnetite
comparison src/cs/services/atp/atp_messages.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 * | |
3 * File Name : atp_messages.h | |
4 * | |
5 * External definition for ATP SW entity | |
6 * | |
7 * (C) Texas Instruments, all rights reserved | |
8 * | |
9 * Version number : 0.1 Date : 28-Feb-2000 | |
10 * | |
11 * History : 0.1 - Created by E. Baissus | |
12 * | |
13 * | |
14 * Author : Eric Baissus : e-baissus@ti.com | |
15 * | |
16 * (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved | |
17 ******************************************************************************/ | |
18 #ifndef ATP_MESSAGES_H | |
19 #define ATP_MESSAGES_H | |
20 | |
21 #include "rv/rv_general.h" | |
22 #include "rvf/rvf_api.h" | |
23 #include "atp/atp_config.h" | |
24 #include "atp/atp_api.h" | |
25 | |
26 #define ATP_MESSAGES_OFFSET (0x32 << 10) | |
27 | |
28 | |
29 /* Generic structure for an ATP message */ | |
30 typedef T_RV_HDR T_ATP_MESSAGE; | |
31 | |
32 | |
33 /* Header used by nearly all the ATP events */ | |
34 typedef struct | |
35 { | |
36 T_RV_HDR rv_hdr; | |
37 T_ATP_PORT_NB port_nb; | |
38 } T_ATP_GENERIC_HEADER; | |
39 | |
40 | |
41 | |
42 | |
43 /* Open port Indication */ | |
44 #define ATP_OPEN_PORT_IND (ATP_MESSAGES_OFFSET | 0x0001) | |
45 | |
46 typedef struct | |
47 { | |
48 T_RV_HDR rv_hdr; | |
49 T_ATP_PORT_NB initiator_port_nb; | |
50 T_ATP_SW_ENTITY_ID initiator_id; | |
51 T_ATP_CUSTOM_INFO *custom_info_p; | |
52 } T_ATP_OPEN_PORT_IND; | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 | |
59 /* Open port Confimation */ | |
60 #define ATP_OPEN_PORT_CFM (ATP_MESSAGES_OFFSET | 0x0002) | |
61 | |
62 typedef struct | |
63 { | |
64 T_RV_HDR rv_hdr; | |
65 T_ATP_PORT_NB initiator_port_nb; | |
66 T_ATP_CUSTOM_INFO *custom_info_p; | |
67 T_ATP_OPEN_PORT_RESULT result; | |
68 } T_ATP_OPEN_PORT_CFM; | |
69 | |
70 | |
71 | |
72 /* Port Closed event */ | |
73 #define ATP_PORT_CLOSED (ATP_MESSAGES_OFFSET | 0x0003) | |
74 | |
75 typedef struct | |
76 { | |
77 T_RV_HDR rv_hdr; | |
78 T_ATP_PORT_NB port_nb; | |
79 T_ATP_SW_ENTITY_ID closer_sw_id; | |
80 T_ATP_PORT_NB closer_port_nb; | |
81 | |
82 } T_ATP_PORT_CLOSED; | |
83 | |
84 | |
85 | |
86 /* Command Ready Event */ | |
87 #define ATP_CMD_RDY (ATP_MESSAGES_OFFSET | 0x0010) | |
88 | |
89 typedef struct | |
90 { | |
91 T_RV_HDR rv_hdr; | |
92 T_ATP_PORT_NB port_nb; | |
93 T_ATP_CMD_TYPE cmd_type; | |
94 T_ATP_CMD_NB cmd_nb; | |
95 T_ATP_CMD *cmd_info_p; | |
96 }T_ATP_CMD_RDY; | |
97 | |
98 | |
99 | |
100 /* Text Command Ready Event */ | |
101 #define ATP_TXT_CMD_RDY (ATP_MESSAGES_OFFSET | 0x0011) | |
102 | |
103 typedef struct | |
104 { | |
105 T_RV_HDR rv_hdr; | |
106 T_ATP_PORT_NB port_nb; | |
107 T_ATP_CMD_TYPE cmd_type; | |
108 T_ATP_TXT_CMD txt_cmd_p; | |
109 }T_ATP_TXT_CMD_RDY; | |
110 | |
111 | |
112 /* No copy data ready event */ | |
113 #define ATP_NO_COPY_DATA_RDY (ATP_MESSAGES_OFFSET | 0x0020) | |
114 | |
115 typedef struct | |
116 { | |
117 T_RV_HDR rv_hdr; | |
118 T_ATP_PORT_NB port_nb; | |
119 UINT32 buffer_size; | |
120 T_ATP_BUFFER atp_buffer_p; | |
121 } T_ATP_NO_COPY_DATA_RDY; | |
122 | |
123 | |
124 | |
125 /* Copy data ready event */ | |
126 #define ATP_DATA_RDY (ATP_MESSAGES_OFFSET | 0x0021) | |
127 | |
128 typedef struct | |
129 { | |
130 T_RV_HDR rv_hdr; | |
131 T_ATP_PORT_NB port_nb; | |
132 UINT32 nb_bytes; | |
133 | |
134 }T_ATP_DATA_RDY; | |
135 | |
136 | |
137 /* Signal changed event*/ | |
138 #define ATP_SIGNAL_CHANGED (ATP_MESSAGES_OFFSET | 0x0030) | |
139 | |
140 typedef struct | |
141 { | |
142 T_RV_HDR rv_hdr; | |
143 T_ATP_PORT_NB port_nb; | |
144 T_ATP_PORT_SIGNAL signal; | |
145 T_ATP_SIGNAL_CHANGE_MASK mask; | |
146 T_RVF_MB_ID mb; | |
147 }T_ATP_SIGNAL_CHANGED; | |
148 | |
149 | |
150 /* Mode changed event*/ | |
151 #define ATP_PORT_MODE_CHANGED (ATP_MESSAGES_OFFSET | 0x0031) | |
152 | |
153 typedef struct | |
154 { | |
155 T_RV_HDR rv_hdr; | |
156 T_ATP_PORT_NB port_nb; | |
157 T_ATP_PORT_MODE mode; | |
158 } T_ATP_PORT_MODE_CHANGED; | |
159 | |
160 | |
161 /* Mode changed event*/ | |
162 #define ATP_ERROR (ATP_MESSAGES_OFFSET | 0x0041) | |
163 | |
164 typedef enum | |
165 { | |
166 ATP_MEMORY_ERROR, | |
167 ATP_PARAM_ERROR, | |
168 ATP_ISSUED_IN_A_WRONG_STATE_ERROR, | |
169 ATP_WAITING_FOR_RESULT, | |
170 ATP_CANNOT_TRANSLATE_CMD, | |
171 ATP_OTHER_SWE_NOT_IN_PROPER_MODE, | |
172 ATP_SAME_ACTION_ALREADY_DONE, // Example : SWE already registerd | |
173 ATP_NO_MORE_RESSOURCE // Example : no more place for any new SWE registration | |
174 } T_ATP_ERROR_TYPE; | |
175 | |
176 typedef enum | |
177 { | |
178 ATP_ERROR_FAILED_TO_OPEN_A_PORT, | |
179 ATP_ERROR_FAILED_TO_ACCEPT_A_PORT, | |
180 ATP_ERROR_FAILED_TO_SEND_CMD, | |
181 ATP_ERROR_FAILED_TO_CLOSE_A_PORT, | |
182 ATP_ERROR_FAILED_TO_SEND_DATA, | |
183 ATP_ERROR_FAILED_TO_GET_DATA, | |
184 ATP_ERROR_FAILED_TO_HANDLE_MODE, | |
185 ATP_ERROR_FAILED_TO_HANDLE_SIGNAL, | |
186 ATP_ERROR_FAILED_TO_HANDLE_FLOW_REDIRECTION, | |
187 ATP_ERROR_FAILED_TO_HANDLE_REGISTRATION, | |
188 ATP_ERROR_FAILED_TO_GET_MEMORY | |
189 } T_ATP_ERROR_MAIN_REASON; | |
190 | |
191 typedef struct // TO UPDATE | |
192 { | |
193 T_RV_HDR rv_hdr; | |
194 T_ATP_ERROR_MAIN_REASON main_reason; | |
195 T_ATP_ERROR_TYPE error_type; | |
196 } T_ATP_ERROR; | |
197 | |
198 | |
199 #endif |