|
1 /* Cypress West Bridge API header file (cyanerr.h) |
|
2 ## Symbols for backward compatibility with previous releases of Antioch SDK. |
|
3 ## =========================== |
|
4 ## |
|
5 ## Copyright Cypress Semiconductor Corporation, 2006-2009, |
|
6 ## All Rights Reserved |
|
7 ## UNPUBLISHED, LICENSED SOFTWARE. |
|
8 ## |
|
9 ## CONFIDENTIAL AND PROPRIETARY INFORMATION |
|
10 ## WHICH IS THE PROPERTY OF CYPRESS. |
|
11 ## |
|
12 ## Use of this file is governed |
|
13 ## by the license agreement included in the file |
|
14 ## |
|
15 ## <install>/license/license.txt |
|
16 ## |
|
17 ## where <install> is the Cypress software |
|
18 ## installation root directory path. |
|
19 ## |
|
20 ## =========================== |
|
21 */ |
|
22 |
|
23 #ifndef _INCLUDED_CYANERR_H_ |
|
24 #define _INCLUDED_CYANERR_H_ |
|
25 |
|
26 #include "cyaserr.h" |
|
27 |
|
28 #ifndef __doxygen__ |
|
29 |
|
30 /* |
|
31 * Function completed successfully. |
|
32 */ |
|
33 #define CY_AN_ERROR_SUCCESS (CY_AS_ERROR_SUCCESS) |
|
34 |
|
35 /* |
|
36 * A function trying to acquire a resource was unable to do so. |
|
37 */ |
|
38 #define CY_AN_ERROR_NOT_ACQUIRED (CY_AS_ERROR_NOT_ACQUIRED) |
|
39 |
|
40 /* |
|
41 * A function trying to acquire a resource was unable to do so. |
|
42 */ |
|
43 #define CY_AN_ERROR_NOT_RELEASED (CY_AS_ERROR_NOT_RELEASED) |
|
44 |
|
45 /* |
|
46 * The West Bridge firmware is not loaded. |
|
47 */ |
|
48 #define CY_AN_ERROR_NO_FIRMWARE (CY_AS_ERROR_NO_FIRMWARE) |
|
49 |
|
50 /* |
|
51 * A timeout occurred waiting on a response from the West Bridge device |
|
52 */ |
|
53 #define CY_AN_ERROR_TIMEOUT (CY_AS_ERROR_TIMEOUT) |
|
54 |
|
55 /* |
|
56 * A request to download firmware was made while not in the CONFIG mode |
|
57 */ |
|
58 #define CY_AN_ERROR_NOT_IN_CONFIG_MODE (CY_AS_ERROR_NOT_IN_CONFIG_MODE) |
|
59 |
|
60 /* |
|
61 * This error is returned if the firmware size specified is too invalid. |
|
62 */ |
|
63 #define CY_AN_ERROR_INVALID_SIZE (CY_AS_ERROR_INVALID_SIZE) |
|
64 |
|
65 /* |
|
66 * This error is returned if a request is made to acquire a resource that has |
|
67 * already been acquired. |
|
68 */ |
|
69 #define CY_AN_ERROR_RESOURCE_ALREADY_OWNED (CY_AS_ERROR_RESOURCE_ALREADY_OWNED) |
|
70 |
|
71 /* |
|
72 * This error is returned if a request is made to release a resource that has |
|
73 * not previously been acquired. |
|
74 */ |
|
75 #define CY_AN_ERROR_RESOURCE_NOT_OWNED (CY_AS_ERROR_RESOURCE_NOT_OWNED) |
|
76 |
|
77 /* |
|
78 * This error is returned when a request is made for a media that does not exist |
|
79 */ |
|
80 #define CY_AN_ERROR_NO_SUCH_MEDIA (CY_AS_ERROR_NO_SUCH_MEDIA) |
|
81 |
|
82 /* |
|
83 * This error is returned when a request is made for a device that does not exist |
|
84 */ |
|
85 #define CY_AN_ERROR_NO_SUCH_DEVICE (CY_AS_ERROR_NO_SUCH_DEVICE) |
|
86 |
|
87 /* |
|
88 * This error is returned when a request is made for a unit that does not exist |
|
89 */ |
|
90 #define CY_AN_ERROR_NO_SUCH_UNIT (CY_AS_ERROR_NO_SUCH_UNIT) |
|
91 |
|
92 /* |
|
93 * This error is returned when a request is made for a block that does not exist |
|
94 */ |
|
95 #define CY_AN_ERROR_INVALID_BLOCK (CY_AS_ERROR_INVALID_BLOCK) |
|
96 |
|
97 /* |
|
98 * This error is returned when an invalid trace level is set. |
|
99 */ |
|
100 #define CY_AN_ERROR_INVALID_TRACE_LEVEL (CY_AS_ERROR_INVALID_TRACE_LEVEL) |
|
101 |
|
102 /* |
|
103 * This error is returned when West Bridge is already in the standby state |
|
104 * and an attempt is made to put West Bridge into this state again. |
|
105 */ |
|
106 #define CY_AN_ERROR_ALREADY_STANDBY (CY_AS_ERROR_ALREADY_STANDBY) |
|
107 |
|
108 /* |
|
109 * This error is returned when the API needs to set a pin on the |
|
110 * West Bridge device, but this is not supported by the underlying HAL |
|
111 * layer. |
|
112 */ |
|
113 #define CY_AN_ERROR_SETTING_WAKEUP_PIN (CY_AS_ERROR_SETTING_WAKEUP_PIN) |
|
114 |
|
115 /* |
|
116 * This error is returned when a module is being started that has |
|
117 * already been started. |
|
118 */ |
|
119 #define CY_AN_ERROR_ALREADY_RUNNING (CY_AS_ERROR_ALREADY_RUNNING) |
|
120 |
|
121 /* |
|
122 * This error is returned when a module is being stopped that has |
|
123 * already been stopped. |
|
124 */ |
|
125 #define CY_AN_ERROR_NOT_RUNNING (CY_AS_ERROR_NOT_RUNNING) |
|
126 |
|
127 /* |
|
128 * This error is returned when the caller tries to claim a media that has already been |
|
129 * claimed. |
|
130 */ |
|
131 #define CY_AN_ERROR_MEDIA_ALREADY_CLAIMED (CY_AS_ERROR_MEDIA_ALREADY_CLAIMED) |
|
132 |
|
133 /* |
|
134 * This error is returned when the caller tries to release a media that has already been |
|
135 * released. |
|
136 */ |
|
137 #define CY_AN_ERROR_MEDIA_NOT_CLAIMED (CY_AS_ERROR_MEDIA_NOT_CLAIMED) |
|
138 |
|
139 /* |
|
140 * This error is returned when canceling trying to cancel an asynchronous operation when |
|
141 * an async operation is not pending. |
|
142 */ |
|
143 #define CY_AN_ERROR_NO_OPERATION_PENDING (CY_AS_ERROR_NO_OPERATION_PENDING) |
|
144 |
|
145 /* |
|
146 * This error is returned when an invalid endpoint number is provided to an API call. |
|
147 */ |
|
148 #define CY_AN_ERROR_INVALID_ENDPOINT (CY_AS_ERROR_INVALID_ENDPOINT) |
|
149 |
|
150 /* |
|
151 * This error is returned when an invalid descriptor type |
|
152 * is specified in an API call. |
|
153 */ |
|
154 #define CY_AN_ERROR_INVALID_DESCRIPTOR (CY_AS_ERROR_INVALID_DESCRIPTOR) |
|
155 |
|
156 /* |
|
157 * This error is returned when an invalid descriptor index |
|
158 * is specified in an API call. |
|
159 */ |
|
160 #define CY_AN_ERROR_BAD_INDEX (CY_AS_ERROR_BAD_INDEX) |
|
161 |
|
162 /* |
|
163 * This error is returned if trying to set a USB descriptor |
|
164 * when in the P port enumeration mode. |
|
165 */ |
|
166 #define CY_AN_ERROR_BAD_ENUMERATION_MODE (CY_AS_ERROR_BAD_ENUMERATION_MODE) |
|
167 |
|
168 /* |
|
169 * This error is returned when the endpoint configuration specified |
|
170 * is not valid. |
|
171 */ |
|
172 #define CY_AN_ERROR_INVALID_CONFIGURATION (CY_AS_ERROR_INVALID_CONFIGURATION) |
|
173 |
|
174 /* |
|
175 * This error is returned when the API cannot verify it is connected |
|
176 * to an West Bridge device. |
|
177 */ |
|
178 #define CY_AN_ERROR_NO_ANTIOCH (CY_AS_ERROR_NO_ANTIOCH) |
|
179 |
|
180 /* |
|
181 * This error is returned when an API function is called and CyAnMiscConfigureDevice |
|
182 * has not been called to configure West Bridge for the current environment. |
|
183 */ |
|
184 #define CY_AN_ERROR_NOT_CONFIGURED (CY_AS_ERROR_NOT_CONFIGURED) |
|
185 |
|
186 /* |
|
187 * This error is returned when West Bridge cannot allocate memory required for |
|
188 * internal API operations. |
|
189 */ |
|
190 #define CY_AN_ERROR_OUT_OF_MEMORY (CY_AS_ERROR_OUT_OF_MEMORY) |
|
191 |
|
192 /* |
|
193 * This error is returned when a module is being started that has |
|
194 * already been started. |
|
195 */ |
|
196 #define CY_AN_ERROR_NESTED_SLEEP (CY_AS_ERROR_NESTED_SLEEP) |
|
197 |
|
198 /* |
|
199 * This error is returned when an operation is attempted on an endpoint that has |
|
200 * been disabled. |
|
201 */ |
|
202 #define CY_AN_ERROR_ENDPOINT_DISABLED (CY_AS_ERROR_ENDPOINT_DISABLED) |
|
203 |
|
204 /* |
|
205 * This error is returned when a call is made to an API function when the device is in |
|
206 * standby. |
|
207 */ |
|
208 #define CY_AN_ERROR_IN_STANDBY (CY_AS_ERROR_IN_STANDBY) |
|
209 |
|
210 /* |
|
211 * This error is returned when an API call is made with an invalid handle value. |
|
212 */ |
|
213 #define CY_AN_ERROR_INVALID_HANDLE (CY_AS_ERROR_INVALID_HANDLE) |
|
214 |
|
215 /* |
|
216 * This error is returned when an invalid response is returned from the West Bridge device. |
|
217 */ |
|
218 #define CY_AN_ERROR_INVALID_RESPONSE (CY_AS_ERROR_INVALID_RESPONSE) |
|
219 |
|
220 /* |
|
221 * This error is returned from the callback function for any asynchronous read or write |
|
222 * request that is canceled. |
|
223 */ |
|
224 #define CY_AN_ERROR_CANCELED (CY_AS_ERROR_CANCELED) |
|
225 |
|
226 /* |
|
227 * This error is returned when the call to create sleep channel fails |
|
228 * in the HAL layer. |
|
229 */ |
|
230 #define CY_AN_ERROR_CREATE_SLEEP_CHANNEL_FAILED (CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED) |
|
231 |
|
232 /* |
|
233 * This error is returned when the call to CyAnMiscLeaveStandby |
|
234 * is made and the device is not in standby. |
|
235 */ |
|
236 #define CY_AN_ERROR_NOT_IN_STANDBY (CY_AS_ERROR_NOT_IN_STANDBY) |
|
237 |
|
238 /* |
|
239 * This error is returned when the call to destroy sleep channel fails |
|
240 * in the HAL layer. |
|
241 */ |
|
242 #define CY_AN_ERROR_DESTROY_SLEEP_CHANNEL_FAILED (CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED) |
|
243 |
|
244 /* |
|
245 * This error is returned when an invalid resource is specified to a call |
|
246 * to CyAnMiscAcquireResource() or CyAnMiscReleaseResource() |
|
247 */ |
|
248 #define CY_AN_ERROR_INVALID_RESOURCE (CY_AS_ERROR_INVALID_RESOURCE) |
|
249 |
|
250 /* |
|
251 * This error occurs when an operation is requested on an endpoint that has |
|
252 * a currently pending async operation. |
|
253 */ |
|
254 #define CY_AN_ERROR_ASYNC_PENDING (CY_AS_ERROR_ASYNC_PENDING) |
|
255 |
|
256 /* |
|
257 * This error is returned when a call to CyAnStorageCancelAsync() or |
|
258 * CyAnUsbCancelAsync() is made when no asynchronous request is pending. |
|
259 */ |
|
260 #define CY_AN_ERROR_ASYNC_NOT_PENDING (CY_AS_ERROR_ASYNC_NOT_PENDING) |
|
261 |
|
262 /* |
|
263 * This error is returned when a request is made to put the West Bridge device |
|
264 * into standby mode while the USB stack is still active. |
|
265 */ |
|
266 #define CY_AN_ERROR_USB_RUNNING (CY_AS_ERROR_USB_RUNNING) |
|
267 |
|
268 /* |
|
269 * A request for in the wrong direction was issued on an endpoint. |
|
270 */ |
|
271 #define CY_AN_ERROR_USB_BAD_DIRECTION (CY_AS_ERROR_USB_BAD_DIRECTION) |
|
272 |
|
273 /* |
|
274 * An invalid request was received |
|
275 */ |
|
276 #define CY_AN_ERROR_INVALID_REQUEST (CY_AS_ERROR_INVALID_REQUEST) |
|
277 |
|
278 /* |
|
279 * An ACK request was requested while no setup packet was pending. |
|
280 */ |
|
281 #define CY_AN_ERROR_NO_SETUP_PACKET_PENDING (CY_AS_ERROR_NO_SETUP_PACKET_PENDING) |
|
282 |
|
283 /* |
|
284 * A call was made to a API function that cannot be called from a callback. |
|
285 */ |
|
286 #define CY_AN_ERROR_INVALID_IN_CALLBACK (CY_AS_ERROR_INVALID_IN_CALLBACK) |
|
287 |
|
288 /* |
|
289 * A call was made to CyAnUsbSetEndPointConfig() before CyAnUsbSetPhysicalConfiguration() |
|
290 * was called. |
|
291 */ |
|
292 #define CY_AN_ERROR_ENDPOINT_CONFIG_NOT_SET (CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET) |
|
293 |
|
294 /* |
|
295 * The physical endpoint referenced is not valid in the current physical configuration |
|
296 */ |
|
297 #define CY_AN_ERROR_INVALID_PHYSICAL_ENDPOINT (CY_AS_ERROR_INVALID_PHYSICAL_ENDPOINT) |
|
298 |
|
299 /* |
|
300 * The data supplied to the CyAnMiscDownloadFirmware() call is not aligned on a |
|
301 * WORD (16 bit) boundary. |
|
302 */ |
|
303 #define CY_AN_ERROR_ALIGNMENT_ERROR (CY_AS_ERROR_ALIGNMENT_ERROR) |
|
304 |
|
305 /* |
|
306 * A call was made to destroy the West Bridge device, but the USB stack or the storage |
|
307 * stack was will running. |
|
308 */ |
|
309 #define CY_AN_ERROR_STILL_RUNNING (CY_AS_ERROR_STILL_RUNNING) |
|
310 |
|
311 /* |
|
312 * A call was made to the API for a function that is not yet supported. |
|
313 */ |
|
314 #define CY_AN_ERROR_NOT_YET_SUPPORTED (CY_AS_ERROR_NOT_YET_SUPPORTED) |
|
315 |
|
316 /* |
|
317 * A NULL callback was provided where a non-NULL callback was required |
|
318 */ |
|
319 #define CY_AN_ERROR_NULL_CALLBACK (CY_AS_ERROR_NULL_CALLBACK) |
|
320 |
|
321 /* |
|
322 * This error is returned when a request is made to put the West Bridge device |
|
323 * into standby mode while the storage stack is still active. |
|
324 */ |
|
325 #define CY_AN_ERROR_STORAGE_RUNNING (CY_AS_ERROR_STORAGE_RUNNING) |
|
326 |
|
327 /* |
|
328 * This error is returned when an operation is attempted that cannot be completed while |
|
329 * the USB stack is connected to a USB host. |
|
330 */ |
|
331 #define CY_AN_ERROR_USB_CONNECTED (CY_AS_ERROR_USB_CONNECTED) |
|
332 |
|
333 /* |
|
334 * This error is returned when a USB disconnect is attempted and the West Bridge device is |
|
335 * not connected. |
|
336 */ |
|
337 #define CY_AN_ERROR_USB_NOT_CONNECTED (CY_AS_ERROR_USB_NOT_CONNECTED) |
|
338 |
|
339 /* |
|
340 * This error is returned when an P2S storage operation attempted and data could not be |
|
341 * read or written to the storage media. |
|
342 */ |
|
343 #define CY_AN_ERROR_MEDIA_ACCESS_FAILURE (CY_AS_ERROR_MEDIA_ACCESS_FAILURE) |
|
344 |
|
345 /* |
|
346 * This error is returned when an P2S storage operation attempted and the media is write |
|
347 * protected. |
|
348 */ |
|
349 #define CY_AN_ERROR_MEDIA_WRITE_PROTECTED (CY_AS_ERROR_MEDIA_WRITE_PROTECTED) |
|
350 |
|
351 /* |
|
352 * This error is returned when an attempt is made to cancel a request that has |
|
353 * already been sent to the West Bridge. |
|
354 */ |
|
355 #define CY_AN_ERROR_OPERATION_IN_TRANSIT (CY_AS_ERROR_OPERATION_IN_TRANSIT) |
|
356 |
|
357 /* |
|
358 * This error is returned when an invalid parameter is passed to one of the APIs. |
|
359 */ |
|
360 #define CY_AN_ERROR_INVALID_PARAMETER (CY_AS_ERROR_INVALID_PARAMETER) |
|
361 |
|
362 /* |
|
363 * This error is returned if an API is not supported by the current West Bridge device |
|
364 * or the active firmware version. |
|
365 */ |
|
366 #define CY_AN_ERROR_NOT_SUPPORTED (CY_AS_ERROR_NOT_SUPPORTED) |
|
367 |
|
368 /* |
|
369 * This error is returned when a call is made to one of the Storage or |
|
370 * USB APIs while the device is in suspend mode. |
|
371 */ |
|
372 #define CY_AN_ERROR_IN_SUSPEND (CY_AS_ERROR_IN_SUSPEND) |
|
373 |
|
374 /* |
|
375 * This error is returned when the call to CyAnMiscLeaveSuspend |
|
376 * is made and the device is not in suspend mode. |
|
377 */ |
|
378 #define CY_AN_ERROR_NOT_IN_SUSPEND (CY_AS_ERROR_NOT_IN_SUSPEND) |
|
379 |
|
380 /* |
|
381 * This error is returned when a command that is disabled by USB is called. |
|
382 */ |
|
383 #define CY_AN_ERROR_FEATURE_NOT_ENABLED (CY_AS_ERROR_FEATURE_NOT_ENABLED) |
|
384 |
|
385 /* |
|
386 * This error is returned when an Async storage read or write is called before a |
|
387 * query device call is issued. |
|
388 */ |
|
389 #define CY_AN_ERROR_QUERY_DEVICE_NEEDED (CY_AS_ERROR_QUERY_DEVICE_NEEDED) |
|
390 |
|
391 /* |
|
392 * This error is returned when a call is made to USB or STORAGE Start or Stop before |
|
393 * a prior Start or Stop has finished. |
|
394 */ |
|
395 #define CY_AN_ERROR_STARTSTOP_PENDING (CY_AS_ERROR_STARTSTOP_PENDING) |
|
396 |
|
397 /* |
|
398 * This error is returned when a request is made for a bus that does not exist |
|
399 */ |
|
400 #define CY_AN_ERROR_NO_SUCH_BUS (CY_AS_ERROR_NO_SUCH_BUS) |
|
401 |
|
402 #endif /* __doxygen__ */ |
|
403 |
|
404 #endif /* _INCLUDED_CYANERR_H_ */ |