|
1 /* Cypress West Bridge API header file (cyasusb.h) |
|
2 ## =========================== |
|
3 ## |
|
4 ## Copyright Cypress Semiconductor Corporation, 2006-2009, |
|
5 ## All Rights Reserved |
|
6 ## UNPUBLISHED, LICENSED SOFTWARE. |
|
7 ## |
|
8 ## CONFIDENTIAL AND PROPRIETARY INFORMATION |
|
9 ## WHICH IS THE PROPERTY OF CYPRESS. |
|
10 ## |
|
11 ## Use of this file is governed |
|
12 ## by the license agreement included in the file |
|
13 ## |
|
14 ## <install>/license/license.txt |
|
15 ## |
|
16 ## where <install> is the Cypress software |
|
17 ## installation root directory path. |
|
18 ## |
|
19 ## =========================== |
|
20 */ |
|
21 |
|
22 #ifndef _INCLUDED_CYASUSB_H_ |
|
23 #define _INCLUDED_CYASUSB_H_ |
|
24 |
|
25 #include "cyasmisc.h" |
|
26 |
|
27 #include "cyas_cplus_start.h" |
|
28 |
|
29 /*@@Enumeration Model |
|
30 Summary |
|
31 The USB enumeration process is the process of communicating to the USB host information |
|
32 about the capabilities of the connected device. This process is completed by servicing |
|
33 requests for various types of descriptors. In the software APIs described below, this |
|
34 process is controlled in one of two ways. |
|
35 |
|
36 Description |
|
37 There are advantages to either type of enumeration and this is why both models are supported. |
|
38 P Port processor based enumeraton gives the P port processor maximum control and flexibility |
|
39 for providing USB configuration information. However, this does require (near) real time data |
|
40 responses from the P port processor during the enumeration process. West Bridge based enumeration |
|
41 requires no real time information from the P port processor, ensuring the fastest possible |
|
42 enumeration times. |
|
43 |
|
44 * P Port Based Enumeration * |
|
45 The first method for handling USB enumeration is for the processor client to handle all |
|
46 endpoint zero requests for descriptors. This mode is configured by indicating to the API |
|
47 that the processor wants to handle all endpoint zero requests. This is done by setting |
|
48 bit 0 in the end_point_mask to a 1. The processor uses CyAsUsbReadDataAsync() to read |
|
49 the request and CyAsUsbWriteDataAsync() to write the response. |
|
50 |
|
51 * West Bridge Based Enumeration * |
|
52 The second method for handling USB enumeration is the configuration information method. |
|
53 Before enabling a connection from the West Bridge device to the USB connector, the P Port |
|
54 processor sends information about the USB configuration to West Bridge through the configuration |
|
55 APIs. This information is stored within the West Bridge device. When a USB cable is attached, |
|
56 the West Bridge device then handles all descriptor requests based on the stored information. |
|
57 Note that this method of enumeration only supports a single USB configuration. |
|
58 |
|
59 In either model of enumeration, the processor client is responsible for ensuring that |
|
60 the system meets USB Chapter 9 compliance requirements. This can be done by providing spec |
|
61 compliant descriptors, and handling any setup packets that are sent to the client |
|
62 appropriately. |
|
63 |
|
64 Mass storage class compliance will be ensured by the West Bridge firmware when the mass |
|
65 storage functionality is enabled. |
|
66 */ |
|
67 |
|
68 /*@@Endpoint Configuration |
|
69 Summary |
|
70 The West Bridge device has one 64-byte control endpoint, one 64-byte low bandwidth endpoint, four bulk |
|
71 endpoints dedicated for mass storage usage, and up to ten bulk/interrupt/isochronous |
|
72 endpoints that can be used for USB-to-Processor communication. |
|
73 |
|
74 Description |
|
75 The four storage endpoints (Endpoints 2, 4, 6 and 8) are reserved for accessing storage |
|
76 devices attached to West Bridge and are not available for use by the processor. These are |
|
77 used implicitly when using the storage API to read/write to the storage media. |
|
78 |
|
79 Endpoint 0 is the standard USB control pipe used for all enumeration activity. Though |
|
80 the endpoint buffer is not directly accessible from the processor, read/write activity |
|
81 can be performed on this endpoint through the API layers. This endpoint is always |
|
82 configured as a bi-directional control endpoint. |
|
83 |
|
84 Endpoint 1 is a 64-byte endpoint that can be used for low bandwidth bulk/interrupt |
|
85 activity. The physical buffer is not accessible from the processor, but can be read/written |
|
86 through the API. As the data coming to this endpoint is being handled through the |
|
87 software layers, there can be loss of data if a read call is not waiting when an OUT |
|
88 packet arrives. |
|
89 |
|
90 Endpoints 3, 5, 7, 9, 10, 11, 12, 13, 14 and 15 are ten configurable endpoints |
|
91 mapped to parts of a total 4 KB FIFO buffer space on the West Bridge device. This 4 KB |
|
92 physical buffer space is divided into up to four endpoints called PEP1, PEP2, PEP3 and PEP4 |
|
93 in this software document. There are multiple configurations in which this buffer space |
|
94 can be used, and the size and number of buffers available to each physical endpoint |
|
95 vary between these configurations. See the West Bridge PDD for details on the buffer |
|
96 orientation corresponding to each configuration. |
|
97 |
|
98 * Note * |
|
99 PEPs 1, 2, 3 and 4 are called Physical EP 3, 5, 7 and 9 in the West Bridge PDD. The |
|
100 sequential number scheme is used in the software to disambiguate these from the logical |
|
101 endpoint numbers, and also for convenience of array indexing. |
|
102 */ |
|
103 |
|
104 #if !defined(__doxygen__) |
|
105 |
|
106 |
|
107 #endif |
|
108 |
|
109 /* Summary |
|
110 This constants defines the maximum size of a USB descriptor when referenced via the |
|
111 CyAsUsbSetDescriptor or CyAsUsbGetDescriptor functions. |
|
112 |
|
113 See Also |
|
114 * CyAsUsbSetDescriptor |
|
115 * CyAsUsbGetDescriptor |
|
116 */ |
|
117 #define CY_AS_MAX_USB_DESCRIPTOR_SIZE (128) |
|
118 |
|
119 /***************************************************************************** |
|
120 * West Bridge Types |
|
121 ****************************************************************************/ |
|
122 |
|
123 |
|
124 /* Summary |
|
125 This data structure is the data passed via the evdata paramater on a usb event |
|
126 callback for the inquiry request. |
|
127 |
|
128 Description |
|
129 When a SCSI inquiry request arrives via the USB connection and the P Port has asked |
|
130 to receive inquiry requests, this request is forwarded to the client via the USB |
|
131 callback. This callback is called twice, once before the inquiry data is forwarded |
|
132 to the host (CyAsEventUsbInquiryBefore) and once after the inquiry has been sent to the |
|
133 USB host (CyAsEventUsbInquiryAfter). The evdata parameter is a pointer to this data |
|
134 structure. |
|
135 |
|
136 *CyAsEventUsbInquiryBefore* |
|
137 If the client just wishes to see the inquiry request and associated data, then a simple |
|
138 return from the callback will forward the inquiry response to the USB host. If the |
|
139 client wishes to change the data returned to the USB host, the updated parameter must |
|
140 be set to CyTrue and the memory area address by the data parameter should be updated. |
|
141 The data pointer can be changed to point to a new memory area and the length field |
|
142 changed to change the amount of data returned from the inquiry request. Note that the |
|
143 data area pointed to by the data parameter must remain valid and the contents must |
|
144 remain consistent until after the CyAsEventUsbInquiryAfter event has occurred. THE LENGTH |
|
145 MUST BE LESS THAN 192 BYTES OR THE CUSTOM INQUIRY RESPONSE WILL NOT BE RETURNED. If the |
|
146 length is too long, the default inquiry response will be returned. |
|
147 |
|
148 *CyAsEventUsbInquiryAfter* |
|
149 If the client needs to free any data, this event signals that the data associated with |
|
150 the inquiry is no longer needed. |
|
151 |
|
152 See Also |
|
153 * CyAsUsbEventCallback |
|
154 * CyAsUsbRegisterCallback |
|
155 */ |
|
156 typedef struct CyAsUsbInquiryData |
|
157 { |
|
158 CyAsBusNumber_t bus ; /* The bus for the event */ |
|
159 uint32_t device ; /* The device the event */ |
|
160 uint8_t evpd ; /* The EVPD bit from the SCSI INQUIRY request */ |
|
161 uint8_t codepage ; /* The codepage in the inquiry request */ |
|
162 CyBool updated ; /* This bool must be set to CyTrue indicate that the inquiry |
|
163 data was changed */ |
|
164 uint16_t length ; /* The length of the data */ |
|
165 void *data ; /* The inquiry data */ |
|
166 } CyAsUsbInquiryData ; |
|
167 |
|
168 |
|
169 /* Summary |
|
170 This data structure is the data passed via the evdata parameter on a usb event |
|
171 callback for the unknown mass storage request. |
|
172 |
|
173 Description |
|
174 When a SCSI request is made that the mass storage firmware in West Bridge does not |
|
175 know how to process, this request is passed to the processor for handling via |
|
176 the usb callback. This data structure is used to pass the request and the |
|
177 associated response. The user may set the status to indicate the status of the |
|
178 request. The status value is the bCSWStatus value from the USB mass storage |
|
179 Command Status Wrapper (0 = command passed, 1 = command failed). If the status |
|
180 is set to command failed (1), the sense information should be set as well. For |
|
181 more information about sense information, see the USB mass storage specification |
|
182 as well as the SCSI specifications for block devices. By default the status is |
|
183 initialized to 1 (failure) with a sense information of 05h/20h/00h which |
|
184 indicates INVALID COMMAND. |
|
185 */ |
|
186 typedef struct CyAsUsbUnknownCommandData |
|
187 { |
|
188 CyAsBusNumber_t bus ; /* The bus for the event */ |
|
189 uint32_t device ; /* The device for the event */ |
|
190 uint16_t reqlen ; /* The length of the requst (should be 16 bytes) */ |
|
191 void *request ; /* The request */ |
|
192 |
|
193 uint8_t status ; /* The returned status value for the command */ |
|
194 uint8_t key ; /* If status is failed, the sense key */ |
|
195 uint8_t asc ; /* If status is failed, the additional sense code */ |
|
196 uint8_t ascq ; /* If status if failed, the additional sense code qualifier */ |
|
197 } CyAsUsbUnknownCommandData ; |
|
198 |
|
199 |
|
200 /* Summary |
|
201 This data structure is the data passed via the evdata paramater on a usb event |
|
202 callback for the start/stop request. |
|
203 |
|
204 Description |
|
205 When a SCSI start stop request arrives via the USB connection and the P Port has asked |
|
206 |
|
207 See Also |
|
208 * CyAsUsbEventCallback |
|
209 * CyAsUsbRegisterCallback |
|
210 */ |
|
211 typedef struct CyAsUsbStartStopData |
|
212 { |
|
213 CyAsBusNumber_t bus ; /* The bus for the event */ |
|
214 uint32_t device ; /* The device for the event */ |
|
215 CyBool start ; /* CyTrue means start request, CyFalse means stop request */ |
|
216 CyBool loej ; /* CyTrue means LoEj bit set, otherwise false */ |
|
217 } CyAsUsbStartStopData ; |
|
218 |
|
219 /* Summary |
|
220 This data type is used to indicate which mass storage devices are enumerated. |
|
221 |
|
222 Description |
|
223 |
|
224 See Also |
|
225 * CyAsUsbEnumControl |
|
226 * CyAsUsbSetEnumConfig |
|
227 */ |
|
228 typedef enum CyAsUsbMassStorageEnum |
|
229 { |
|
230 CyAsUsbNandEnum = 0x01, |
|
231 CyAsUsbSDEnum = 0x02, |
|
232 CyAsUsbMMCEnum = 0x04, |
|
233 CyAsUsbCEATAEnum = 0x08 |
|
234 } CyAsUsbMassStorageEnum ; |
|
235 |
|
236 /* Summary |
|
237 This data type specifies the type of descriptor to transfer to the West Bridge device |
|
238 |
|
239 Description |
|
240 During enumeration, if West Bridge is handling enumeration, the West Bridge device needs to USB descriptors |
|
241 to complete the enumeration. The function CyAsUsbSetDescriptor() is used to transfer the descriptors |
|
242 to the West Bridge device. This type is an argument to that function and specifies which descriptor |
|
243 is being transferred. |
|
244 |
|
245 See Also |
|
246 * CyAsUsbSetDescriptor |
|
247 * CyAsUsbGetDescriptor |
|
248 */ |
|
249 typedef enum CyAsUsbDescType |
|
250 { |
|
251 CyAsUsbDescDevice = 1, /* A device descriptor - See USB 2.0 specification Chapter 9 */ |
|
252 CyAsUsbDescDeviceQual = 2, /* A device descriptor qualifier - See USB 2.0 specification Chapter 9 */ |
|
253 CyAsUsbDescFSConfiguration = 3, /* A configuration descriptor for FS operation - See USB 2.0 specification Chapter 9 */ |
|
254 CyAsUsbDescHSConfiguration = 4, /* A configuration descriptor for HS operation - See USB 2.0 specification Chapter 9 */ |
|
255 CyAsUsbDescString = 5 |
|
256 } CyAsUsbDescType ; |
|
257 |
|
258 /* Summary |
|
259 This type specifies the direction of an endpoint |
|
260 |
|
261 Description |
|
262 This type is used when configuring the endpoint hardware to specify the direction |
|
263 of the endpoint. |
|
264 |
|
265 See Also |
|
266 * CyAsUsbEndPointConfig |
|
267 * CyAsUsbSetEndPointConfig |
|
268 * CyAsUsbGetEndPointConfig |
|
269 */ |
|
270 typedef enum CyAsUsbEndPointDir |
|
271 { |
|
272 CyAsUsbIn = 0, /* The endpoint direction is IN (West Bridge -> USB Host) */ |
|
273 CyAsUsbOut = 1, /* The endpoint direction is OUT (USB Host -> West Bridge) */ |
|
274 CyAsUsbInOut = 2 /* The endpoint direction is IN/OUT (valid only for EP 0 & 1) */ |
|
275 } CyAsUsbEndPointDir ; |
|
276 |
|
277 /* Summary |
|
278 This type specifies the type of an endpoint |
|
279 |
|
280 Description |
|
281 This type is used when configuring the endpoint hardware to specify the type of |
|
282 endpoint. |
|
283 |
|
284 See Also |
|
285 * CyAsUsbEndPointConfig |
|
286 * CyAsUsbSetEndPointConfig |
|
287 * CyAsUsbGetEndPointConfig |
|
288 */ |
|
289 typedef enum CyAsUsbEndPointType |
|
290 { |
|
291 CyAsUsbControl, |
|
292 CyAsUsbIso, |
|
293 CyAsUsbBulk, |
|
294 CyAsUsbInt |
|
295 } CyAsUsbEndPointType ; |
|
296 |
|
297 /* Summary |
|
298 This type is a structure used to indicate the top level configuration of the USB stack |
|
299 |
|
300 Description |
|
301 In order to configure the USB stack, the CyAsUsbSetEnumConfig() function is called to indicate |
|
302 how mass storage is to be handled, the specific number of interfaces to be supported if |
|
303 West Bridge is handling enumeration, and the end points of specifi interest. This structure |
|
304 contains this information. |
|
305 |
|
306 See Also |
|
307 * CyAsUsbSetConfig |
|
308 * CyAsUsbGetConfig |
|
309 * <LINK Enumeration Model> |
|
310 */ |
|
311 typedef struct CyAsUsbEnumControl |
|
312 { |
|
313 CyBool devices_to_enumerate[CY_AS_MAX_BUSES][CY_AS_MAX_STORAGE_DEVICES]; |
|
314 /* Designate which devices on which buses to enumerate */ |
|
315 CyBool antioch_enumeration ; /* If true, West Bridge will control enumeration. If this is false the |
|
316 P port controls enumeration. If the P Port is controlling |
|
317 enumeration, traffic will be received via endpoint zero. */ |
|
318 uint8_t mass_storage_interface ; /* This is the interface # to use for the mass storage interface, |
|
319 if mass storage is enumerated. If mass storage is not enumerated |
|
320 this value should be zero. */ |
|
321 uint8_t mtp_interface ; /* This is the interface # to use for the MTP interface, |
|
322 if MTP is enumerated. If MTP is not enumerated |
|
323 this value should be zero. */ |
|
324 CyBool mass_storage_callbacks ; /* If true, Inquiry, START/STOP, and unknown mass storage |
|
325 requests cause a callback to occur for handling by the |
|
326 baseband processor. */ |
|
327 } CyAsUsbEnumControl ; |
|
328 |
|
329 |
|
330 /* Summary |
|
331 This structure is used to configure a single endpoint |
|
332 |
|
333 Description |
|
334 This data structure contains all of the information required to configure the West Bridge hardware |
|
335 associated with a given endpoint. |
|
336 |
|
337 See Also |
|
338 * CyAsUsbSetEndPointConfig |
|
339 * CyAsUsbGetEndPointConfig |
|
340 */ |
|
341 typedef struct CyAsUsbEndPointConfig |
|
342 { |
|
343 CyBool enabled ; /* If true, this endpoint is enabled */ |
|
344 CyAsUsbEndPointDir dir ; /* The direction of this endpoint */ |
|
345 CyAsUsbEndPointType type ; /* The type of endpoint */ |
|
346 CyAsEndPointNumber_t physical ; /* The physical endpoint #, 1, 2, 3, 4 */ |
|
347 uint16_t size ; /* The size of the endpoint in bytes */ |
|
348 } CyAsUsbEndPointConfig ; |
|
349 |
|
350 /* Summary |
|
351 List of partition enumeration combinations that can be selected on a partitioned |
|
352 storage device. |
|
353 |
|
354 Description |
|
355 West Bridge firmware supports creating upto two partitions on mass storage |
|
356 devices connected to West Bridge. When there are two partitions on a device, |
|
357 the user can choose which of these partitions should be made visible to a USB |
|
358 host through the mass storage interface. This enumeration lists the various |
|
359 enumeration selections that can be made. |
|
360 |
|
361 See Also |
|
362 * CyAsStorageCreatePPartition |
|
363 * CyAsStorageRemovePPartition |
|
364 * CyAsUsbSelectMSPartitions |
|
365 */ |
|
366 typedef enum CyAsUsbMSType_t { |
|
367 CyAsUsbMSUnit0 = 0, /* Enumerate only partition 0 as CD (autorun) device */ |
|
368 CyAsUsbMSUnit1, /* Enumerate only partition 1 as MS device (default setting) */ |
|
369 CyAsUsbMSBoth /* Enumerate both units */ |
|
370 } CyAsUsbMSType_t ; |
|
371 |
|
372 /* Summary |
|
373 This type specifies the type of USB event that has occurred |
|
374 |
|
375 Description |
|
376 This type is used in the USB event callback function to indicate the type of USB event |
|
377 that has occurred. The callback function includes both this reasons for the callback |
|
378 and a data parameter associated with the reason. The data parameter is used in a reason |
|
379 specific way and is documented below with each reason. |
|
380 |
|
381 See Also |
|
382 * CyAsUsbIoCallback |
|
383 */ |
|
384 typedef enum CyAsUsbEvent |
|
385 { |
|
386 CyAsEventUsbSuspend, /* This event is sent when West Bridge is put into the suspend |
|
387 state by the USB host. The data parameter is not used and |
|
388 will be zero. */ |
|
389 CyAsEventUsbResume, /* This event is sent when West Bridge is taken out of the |
|
390 suspend state by the USB host. The data parameter is not |
|
391 used and will be zero. */ |
|
392 CyAsEventUsbReset, /* This event is sent when a USB reset request is received |
|
393 by the West Bridge device. The data parameter is not used and |
|
394 will be zero. */ |
|
395 CyAsEventUsbSetConfig, /* This event is sent when a USB set configuration request is made. |
|
396 The data parameter is a pointer to a uint16_t that contains the |
|
397 configuration number. The configuration number may be zero to |
|
398 indicate an unconfigure operation. */ |
|
399 CyAsEventUsbSpeedChange, /* This event is sent when the USB connection changes speed. This is |
|
400 generally a transition from full speed to high speed. The parameter |
|
401 to this event is a pointer to uint16_t that gives the speed of the |
|
402 USB connection. Zero indicates full speed, one indicates high speed */ |
|
403 CyAsEventUsbSetupPacket, /* This event is sent when a setup packet is received. The data parameter |
|
404 is a pointer to the eight bytes of setup data. */ |
|
405 CyAsEventUsbStatusPacket, /* This event is sent when a status packet is received. The data |
|
406 parameter is not used. */ |
|
407 CyAsEventUsbInquiryBefore, /* This event is sent when mass storage receives an inquiry |
|
408 request and we have asked to see these requests. */ |
|
409 CyAsEventUsbInquiryAfter, /* This event is sent when mass storage has finished processing an |
|
410 inquiry request and any data associated with the request is no longer |
|
411 required. */ |
|
412 CyAsEventUsbStartStop, /* This event is sent when mass storage receives a start/stop request and |
|
413 we have asked to see these requests */ |
|
414 CyAsEventUsbClearFeature, /* This event is sent when a Clear Feature request is received. The data |
|
415 parameter is the endpoint number. */ |
|
416 CyAsEventUsbUnknownStorage, /* This event is sent when mass storage receives a request that is not known |
|
417 and we have asked to see these requests */ |
|
418 CyAsEventUsbMSCProgress /* This event is sent when the read/write activity on the USB mass |
|
419 storage has crossed a pre-set level */ |
|
420 } CyAsUsbEvent; |
|
421 |
|
422 /* Summary |
|
423 This type is the type of a callback function that is called when a USB event occurs |
|
424 |
|
425 Description |
|
426 At times West Bridge needs to inform the P port processor of events that have |
|
427 occurred. These events are asynchronous to the thread of control on the P |
|
428 port processor and as such are generally delivered via a callback function that |
|
429 is called as part of an interrupt handler. This type defines the type of function |
|
430 that must be provided as a callback function for USB events. |
|
431 |
|
432 See Also |
|
433 * CyAsUsbEvent |
|
434 */ |
|
435 typedef void (*CyAsUsbEventCallback)( |
|
436 CyAsDeviceHandle handle, /* Handle to the device to configure */ |
|
437 CyAsUsbEvent ev, /* The event type being reported */ |
|
438 void * evdata /* The data assocaited with the event being reported */ |
|
439 ) ; |
|
440 |
|
441 |
|
442 /* Summary |
|
443 This type is the callback function called after an asynchronous USB read/write operation |
|
444 |
|
445 Description |
|
446 This function type defines a callback function that is called at the completion of any |
|
447 asynchronous read or write operation. |
|
448 |
|
449 See Also |
|
450 * CyAsUsbReadDataAsync |
|
451 * CyAsUsbWriteDataAsync |
|
452 * CY_AS_ERROR_CANCELED |
|
453 */ |
|
454 typedef void (*CyAsUsbIoCallback)( |
|
455 CyAsDeviceHandle handle, /* Handle to the device to configure */ |
|
456 CyAsEndPointNumber_t ep, /* The endpoint that has completed an operation */ |
|
457 uint32_t count, /* THe amount of data transferred to/from USB */ |
|
458 void * buffer, /* The data buffer for the operation */ |
|
459 CyAsReturnStatus_t status /* The error status of the operation */ |
|
460 ) ; |
|
461 |
|
462 /* Summary |
|
463 This type is the callback function called after asynchronous API functions have completed. |
|
464 |
|
465 Description |
|
466 When calling API functions from callback routines (interrupt handlers usually) the async version of |
|
467 these functions must be used. This callback is called when an asynchronous API function has completed. |
|
468 */ |
|
469 typedef void (*CyAsUsbFunctionCallback)( |
|
470 CyAsDeviceHandle handle, /* Handle to the device to configure */ |
|
471 CyAsReturnStatus_t status, /* The error status of the operation */ |
|
472 uint32_t client /* A client supplied 32 bit tag */ |
|
473 ) ; |
|
474 |
|
475 |
|
476 /***************************************************************************** |
|
477 * West Bridge Functions |
|
478 ****************************************************************************/ |
|
479 |
|
480 /* Summary |
|
481 This function starts the USB stack |
|
482 |
|
483 Description |
|
484 This function initializes the West Bridge USB software stack if it has not yet been stared. |
|
485 This initializes any required data structures and powers up any USB specific portions of |
|
486 the West Bridge hardware. If the stack had already been started, the USB stack reference count |
|
487 is incremented. |
|
488 |
|
489 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
490 * Nestable: YES |
|
491 |
|
492 Notes |
|
493 This function cannot be called from any type of West Bridge callback. |
|
494 |
|
495 Returns |
|
496 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
497 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
498 * CY_AS_ERROR_SUCCESS - the stack initialized and is ready for use |
|
499 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
500 |
|
501 See Also |
|
502 * CyAsUsbStop |
|
503 */ |
|
504 EXTERN CyAsReturnStatus_t |
|
505 CyAsUsbStart( |
|
506 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
507 CyAsFunctionCallback cb, /* The callback if async call */ |
|
508 uint32_t client /* Client supplied data */ |
|
509 ) ; |
|
510 |
|
511 /* Summary |
|
512 This function stops the USB stack |
|
513 |
|
514 Description |
|
515 This function decrements the reference count for the USB stack and if this count |
|
516 is zero, the USB stack is shut down. The shutdown frees all resources associated |
|
517 with the USB stack. |
|
518 |
|
519 * Valid In Asynchronous Callback: NO |
|
520 |
|
521 Notes |
|
522 While all resources associated with the USB stack will be freed is a shutdown occurs, |
|
523 resources associated with underlying layers of the software will not be freed if they |
|
524 are shared by the storage stack and the storage stack is active. Specifically the DMA manager, |
|
525 the interrupt manager, and the West Bridge communications module are all shared by both the |
|
526 USB stack and the storage stack. |
|
527 |
|
528 Returns |
|
529 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
530 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
531 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
532 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
533 |
|
534 See Also |
|
535 * CyAsUsbStart |
|
536 */ |
|
537 EXTERN CyAsReturnStatus_t |
|
538 CyAsUsbStop( |
|
539 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
540 CyAsFunctionCallback cb, /* The callback if async call */ |
|
541 uint32_t client /* Client supplied data */ |
|
542 ) ; |
|
543 |
|
544 /* Summary |
|
545 This function registers a callback function to be called when an asynchronous USB event occurs |
|
546 |
|
547 Description |
|
548 When asynchronous USB events occur, a callback function can be called to alert the calling program. This |
|
549 functions allows the calling program to register a callback. |
|
550 |
|
551 * Valid In Asynchronous Callback: YES |
|
552 */ |
|
553 EXTERN CyAsReturnStatus_t |
|
554 CyAsUsbRegisterCallback( |
|
555 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
556 CyAsUsbEventCallback callback /* The function to call */ |
|
557 ) ; |
|
558 |
|
559 |
|
560 /* Summary |
|
561 This function connects the West Bridge device D+ and D- signals physically to the USB host. |
|
562 |
|
563 Description |
|
564 The West Bridge device has the ability to programmatically disconnect the USB pins on the device |
|
565 from the USB host. This feature allows for re-enumeration of the West Bridge device as a different |
|
566 device when necessary. This function connects the D+ and D- signal physically to the USB host |
|
567 if they have been previously disconnnected. |
|
568 |
|
569 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
570 * Nestable: YES |
|
571 |
|
572 Returns |
|
573 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
574 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
575 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
576 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
577 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
578 |
|
579 See Also |
|
580 * CyAsUsbDisconnect |
|
581 */ |
|
582 EXTERN CyAsReturnStatus_t |
|
583 CyAsUsbConnect( |
|
584 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
585 CyAsFunctionCallback cb, /* The callback if async call */ |
|
586 uint32_t client /* Client supplied data */ |
|
587 ) ; |
|
588 |
|
589 /* Summary |
|
590 This function disconnects the West Bridge device D+ and D- signals physically from the USB host. |
|
591 |
|
592 Description |
|
593 The West Bridge device has the ability to programmatically disconnect the USB pins on the device |
|
594 from the USB host. This feature allows for re-enumeration of the West Bridge device as a different |
|
595 device when necessary. This function disconnects the D+ and D- signal physically from the USB host |
|
596 if they have been previously connected. |
|
597 |
|
598 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
599 * Nestable: YES |
|
600 |
|
601 Returns |
|
602 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
603 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
604 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
605 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
606 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
607 |
|
608 See Also |
|
609 * CyAsUsbConnect |
|
610 */ |
|
611 EXTERN CyAsReturnStatus_t |
|
612 CyAsUsbDisconnect( |
|
613 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
614 CyAsFunctionCallback cb, /* The callback if async call */ |
|
615 uint32_t client /* Client supplied data */ |
|
616 ) ; |
|
617 |
|
618 /* Summary |
|
619 This function configures the USB stack |
|
620 |
|
621 Description |
|
622 This function is used to configure the USB stack. It is used to indicate which endpoints are going to |
|
623 be used, and how to deal with the mass storage USB device within West Bridge. |
|
624 |
|
625 * Valid In Asynchronous Callback: Yes (if cb supplied) |
|
626 |
|
627 Returns |
|
628 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
629 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
630 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
631 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
632 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
633 |
|
634 See Also |
|
635 * CyAsUsbGetEnumConfig |
|
636 * CyAsUsbEnumControl |
|
637 */ |
|
638 EXTERN CyAsReturnStatus_t |
|
639 CyAsUsbSetEnumConfig( |
|
640 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
641 CyAsUsbEnumControl * config_p, /* The USB configuration information */ |
|
642 CyAsFunctionCallback cb, /* The callback if async call */ |
|
643 uint32_t client /* Client supplied data */ |
|
644 ) ; |
|
645 |
|
646 /* Summary |
|
647 This function retreives the current configuration of the USB stack |
|
648 |
|
649 Description |
|
650 This function sends a request to West Bridge to retreive the current configuration |
|
651 |
|
652 * Valid In Asynchronous Callback: Yes (if cb supplied) |
|
653 |
|
654 Returns |
|
655 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
656 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
657 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
658 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
659 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
660 |
|
661 See Also |
|
662 * CyAsUsbSetConfig |
|
663 * CyAsUsbConfig |
|
664 */ |
|
665 EXTERN CyAsReturnStatus_t |
|
666 CyAsUsbGetEnumConfig( |
|
667 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
668 CyAsUsbEnumControl* config_p, /* The return value for USB congifuration information */ |
|
669 CyAsFunctionCallback cb, /* The callback if async call */ |
|
670 uint32_t client /* Client supplied data */ |
|
671 ) ; |
|
672 |
|
673 /* Summary |
|
674 This function sets the USB descriptor |
|
675 |
|
676 Description |
|
677 This function is used to set the various descriptors assocaited with the USB enumeration |
|
678 process. This function should only be called when the West Bridge enumeration model is selected. |
|
679 Descriptors set using this function can be cleared by stopping the USB stack, or by calling |
|
680 the CyAsUsbClearDescriptors function. |
|
681 |
|
682 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
683 * Nestable: YES |
|
684 |
|
685 Notes |
|
686 These descriptors are described in the USB 2.0 specification, Chapter 9. |
|
687 |
|
688 Returns |
|
689 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
690 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
691 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
692 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
693 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
694 * CY_AS_ERROR_INVALID_DESCRIPTOR - the descriptor passed is not valid |
|
695 * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given |
|
696 * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration |
|
697 |
|
698 See Also |
|
699 * CyAsUsbGetDescriptor |
|
700 * CyAsUsbClearDescriptors |
|
701 * <LINK Enumeration Model> |
|
702 */ |
|
703 EXTERN CyAsReturnStatus_t |
|
704 CyAsUsbSetDescriptor( |
|
705 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
706 CyAsUsbDescType type, /* The type of descriptor */ |
|
707 uint8_t index, /* Only valid for string descriptors */ |
|
708 void * desc_p, /* The descriptor to be transferred */ |
|
709 uint16_t length, /* The length of the descriptor in bytes */ |
|
710 CyAsFunctionCallback cb, /* The callback if async call */ |
|
711 uint32_t client /* Client supplied data */ |
|
712 ) ; |
|
713 |
|
714 /* Summary |
|
715 This function clears all user descriptors stored on the West Bridge. |
|
716 |
|
717 Description |
|
718 This function is used to clear all descriptors that were previously |
|
719 stored on the West Bridge through CyAsUsbSetDescriptor calls, and go back |
|
720 to the default descriptor setup in the firmware. This function should |
|
721 only be called when the Antioch enumeration model is selected. |
|
722 |
|
723 * Valid In Asynchronous Callback: Yes (if cb supplied) |
|
724 * Nestable: Yes |
|
725 |
|
726 Returns |
|
727 * CY_AS_ERROR_SUCCESS - all descriptors cleared successfully |
|
728 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
729 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
730 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
731 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
732 * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor is doing enumeration |
|
733 |
|
734 See Also |
|
735 * CyAsUsbSetDescriptor |
|
736 * <LINK Enumeration Model> |
|
737 */ |
|
738 EXTERN CyAsReturnStatus_t |
|
739 CyAsUsbClearDescriptors( |
|
740 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
741 CyAsFunctionCallback cb, /* The callback if async call */ |
|
742 uint32_t client /* Client supplied data */ |
|
743 ) ; |
|
744 /* Summary |
|
745 This structure contains the descriptor buffer to be filled by CyAsUsbGetDescriptor API. |
|
746 |
|
747 Description |
|
748 This data structure the buffer to hold the descriptor data, and an in/out parameter ti indicate the |
|
749 lenght of the buffer and descriptor data in bytes. |
|
750 |
|
751 See Also |
|
752 * CyAsUsbGetDescriptor |
|
753 */ |
|
754 typedef struct CyAsGetDescriptorData |
|
755 { |
|
756 void * desc_p; /* The buffer to hold the returned descriptor */ |
|
757 uint32_t length; /* This is an input and output parameter. Before the code this pointer |
|
758 points to a uint32_t that contains the length of the buffer. After |
|
759 the call, this value contains the amount of data actually returned. */ |
|
760 |
|
761 } CyAsGetDescriptorData ; |
|
762 |
|
763 /* Summary |
|
764 This function retreives a given descriptor from the West Bridge device |
|
765 |
|
766 Description |
|
767 This function retreives a USB descriptor from the West Bridge device. This function should only be called when the |
|
768 West Bridge enumeration model is selected. |
|
769 |
|
770 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
771 * Nestable: YES |
|
772 |
|
773 Notes |
|
774 These descriptors are described in the USB 2.0 specification, Chapter 9. |
|
775 |
|
776 Returns |
|
777 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
778 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
779 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
780 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
781 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
782 * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given |
|
783 * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration |
|
784 |
|
785 See Also |
|
786 * CyAsUsbSetDescriptor |
|
787 * <LINK Enumeration Model> |
|
788 */ |
|
789 |
|
790 EXTERN CyAsReturnStatus_t |
|
791 CyAsUsbGetDescriptor( |
|
792 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
793 CyAsUsbDescType type, /* The type of descriptor */ |
|
794 uint8_t index, /* Index for string descriptor */ |
|
795 CyAsGetDescriptorData * data, /* Parameters and return value for the get descriptor call */ |
|
796 CyAsFunctionCallback cb, /* The callback if async call */ |
|
797 uint32_t client /* Client supplied data */ |
|
798 ) ; |
|
799 |
|
800 /* Summary |
|
801 This function sets the configuration of the physical endpoints into one of the |
|
802 twelve supported configuration |
|
803 |
|
804 Description |
|
805 USB endpoints are mapped onto one of four physical endpoints in the device. Therefore |
|
806 USB endpoints are known as logical endpoints and these logical endpoints are mapped to |
|
807 one of four physical endpoints. In support of these four physical endpoints there is |
|
808 four kilo-bytes of buffer spaces that can be used as buffers for these physical endpoints. |
|
809 This 4K of buffer space can be configured in one of twelve ways. This function sets the |
|
810 buffer configuration for the physical endpoints. |
|
811 |
|
812 * Config 1: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 512), PEP4 (2 * 512) |
|
813 * Config 2: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (4 * 512), PEP4 (N/A) |
|
814 * Config 3: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 1024), PEP4(N/A) |
|
815 * Config 4: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512) |
|
816 * Config 5: PEP1 (4 * 512), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A) |
|
817 * Config 6: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A) |
|
818 * Config 7: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512) |
|
819 * Config 8: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A) |
|
820 * Config 9: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A) |
|
821 * Config 10: PEP1 (3 * 512), PEP2 (N/A), PEP3 (3 * 512), PEP4 (2 * 512) |
|
822 * Config 11: PEP1 (3 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (2 * 512) |
|
823 * Config 12: PEP1 (4 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (N/A) |
|
824 |
|
825 * Valid In Asynchronous Callback: NO |
|
826 |
|
827 Returns |
|
828 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
829 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
830 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
831 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
832 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
833 * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration given is not between 1 and 12 |
|
834 */ |
|
835 EXTERN CyAsReturnStatus_t |
|
836 CyAsUsbSetPhysicalConfiguration( |
|
837 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
838 uint8_t config /* The physical endpoint configuration number */ |
|
839 ) ; |
|
840 |
|
841 /* Summary |
|
842 This function sets the hardware configuration for a given endpoint |
|
843 |
|
844 Description |
|
845 This function sets the hardware configuration for a given endpoint. This is the method to set the |
|
846 direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering |
|
847 style for the endpoint. |
|
848 |
|
849 * Valid In Asynchronous Callback: NO |
|
850 |
|
851 Notes |
|
852 Add documentation about endpoint configuration limitations |
|
853 |
|
854 Returns |
|
855 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
856 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
857 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
858 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
859 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
860 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
861 * CY_AS_ERROR_INVALID_CONFIGURATION - the endpoint configuration given is not valid |
|
862 * CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET - the physical endpoint configuration is not set |
|
863 |
|
864 See Also |
|
865 * CyAsUsbGetEndPointConfig |
|
866 * CyAsUsbEndPointConfig |
|
867 */ |
|
868 EXTERN CyAsReturnStatus_t |
|
869 CyAsUsbSetEndPointConfig( |
|
870 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
871 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
872 CyAsUsbEndPointConfig * config_p /* The configuration information for the endpoint */ |
|
873 ) ; |
|
874 |
|
875 /* Summary |
|
876 This function retreives the hardware configuration for a given endpoint |
|
877 |
|
878 Description |
|
879 This function gets the hardware configuration for the given endpoint. This include information about |
|
880 the direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering |
|
881 style for the endpoint. |
|
882 |
|
883 * Valid In Asynchronous Callback: NO |
|
884 |
|
885 Returns |
|
886 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
887 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
888 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
889 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
890 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
891 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
892 |
|
893 See Also |
|
894 * CyAsUsbSetEndPointConfig |
|
895 * CyAsUsbEndPointConfig |
|
896 */ |
|
897 EXTERN CyAsReturnStatus_t |
|
898 CyAsUsbGetEndPointConfig( |
|
899 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
900 CyAsEndPointNumber_t ep, /* The endpoint of interest*/ |
|
901 CyAsUsbEndPointConfig * config_p /* The return value containing the endpoint config information */ |
|
902 ) ; |
|
903 |
|
904 /* Summary |
|
905 This function commits the configuration information that has previously been set. |
|
906 |
|
907 Description |
|
908 The initialization process involves calling CyAsUsbSetEnumConfig() and CyAsUsbSetEndPointConfig(). These |
|
909 functions do not actually send the configuration information to the West Bridge device. Instead, these |
|
910 functions store away the configuration information and this CyAsUsbCommitConfig() actually finds the |
|
911 best hardware configuration based on the requested endpoint configuration and sends thsi optimal |
|
912 confiuration down to the West Bridge device. |
|
913 |
|
914 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
915 * Nestable: YES |
|
916 |
|
917 Returns |
|
918 * CY_AS_ERROR_SUCCESS - a configuration was found and sent to West Bridge |
|
919 * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured |
|
920 * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge |
|
921 * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration requested is not possible |
|
922 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
923 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
924 |
|
925 See Also |
|
926 * CyAsUsbSetEndPointConfig |
|
927 * CyAsUsbSetEnumConfig |
|
928 */ |
|
929 |
|
930 EXTERN CyAsReturnStatus_t |
|
931 CyAsUsbCommitConfig( |
|
932 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
933 CyAsFunctionCallback cb, /* The callback if async call */ |
|
934 uint32_t client /* Client supplied data */ |
|
935 ) ; |
|
936 |
|
937 /* Summary |
|
938 This function reads data from a USB endpoint. |
|
939 |
|
940 Description |
|
941 This function reads data from an OUT. This function blocks until the read is complete. |
|
942 If this is a packet read, a single received USB packet will complete the read. If this |
|
943 is not a packet read, this function will block until all of the data requested has been |
|
944 recevied. |
|
945 |
|
946 * Valid In Asynchronous Callback: NO |
|
947 |
|
948 Returns |
|
949 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
950 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
951 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
952 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
953 |
|
954 See Also |
|
955 * CyAsUsbReadDataAsync |
|
956 * CyAsUsbWriteData |
|
957 * CyAsUsbWriteDataAsync |
|
958 */ |
|
959 EXTERN CyAsReturnStatus_t |
|
960 CyAsUsbReadData( |
|
961 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
962 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
963 CyBool pktread, /* If CyTrue, this is a packet read */ |
|
964 uint32_t dsize, /* The amount of data to read */ |
|
965 uint32_t * dataread, /* The amount of data read */ |
|
966 void * data /* The buffer to hold the data read */ |
|
967 ) ; |
|
968 |
|
969 /* Summary |
|
970 This function reads data from a USB endpoint |
|
971 |
|
972 Description |
|
973 This function reads data from an OUT endpoint. This function will return immediately and |
|
974 the callback provided will be called when the read is complete. If this is a packet read, |
|
975 then the callback will be called on the next received packet. If this is not a packet read, |
|
976 the callback will be called when the requested data is received. |
|
977 |
|
978 * Valid In Asynchronous Callback: YES |
|
979 |
|
980 Returns |
|
981 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
982 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
983 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
984 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
985 |
|
986 See Also |
|
987 * CyAsUsbReadData |
|
988 * CyAsUsbWriteData |
|
989 * CyAsUsbWriteDataAsync |
|
990 */ |
|
991 EXTERN CyAsReturnStatus_t |
|
992 CyAsUsbReadDataAsync( |
|
993 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
994 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
995 CyBool pktread, /* If CyTrue, this is a packet read */ |
|
996 uint32_t dsize, /* The amount of data to read */ |
|
997 void * data, /* The buffer for storing the data */ |
|
998 CyAsUsbIoCallback callback /* The callback function to call when the data is read */ |
|
999 ) ; |
|
1000 |
|
1001 /* Summary |
|
1002 This function writes data to a USB endpoint |
|
1003 |
|
1004 Description |
|
1005 This function writes data to an IN endpoint data buffer. Multiple USB packets may be sent |
|
1006 until all data requested has been sent. This function blocks until all of the data has been sent. |
|
1007 |
|
1008 * Valid In Asynchronous Callback: NO |
|
1009 |
|
1010 Notes |
|
1011 Calling this function with a dsize of zero will result in a zero length packet transmitted to the |
|
1012 USB host. |
|
1013 |
|
1014 Returns |
|
1015 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
1016 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1017 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1018 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
1019 |
|
1020 See Also |
|
1021 * CyAsUsbReadData |
|
1022 * CyAsUsbReadDataAsync |
|
1023 * CyAsUsbWriteDataAsync |
|
1024 */ |
|
1025 EXTERN CyAsReturnStatus_t |
|
1026 CyAsUsbWriteData( |
|
1027 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1028 CyAsEndPointNumber_t ep, /* The endpoint to write data to */ |
|
1029 uint32_t dsize, /* The size of the data to write */ |
|
1030 void * data /* The data buffer */ |
|
1031 ) ; |
|
1032 |
|
1033 /* Summary |
|
1034 This function writes data to a USB endpoint |
|
1035 |
|
1036 Description |
|
1037 This function writes data to an IN endpoint data buffer. This function returns immediately |
|
1038 and when the write completes, or if an error occurs, the callback function is called to indicate |
|
1039 completion of the write operation. |
|
1040 |
|
1041 * Valid In Asynchronous Callback: YES |
|
1042 |
|
1043 Notes |
|
1044 Calling this function with a dsize of zero will result in a zero length packet transmitted to the |
|
1045 USB host. |
|
1046 |
|
1047 Returns |
|
1048 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
1049 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1050 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1051 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid |
|
1052 |
|
1053 See Also |
|
1054 * CyAsUsbReadData |
|
1055 * CyAsUsbReadDataAsync |
|
1056 * CyAsUsbWriteData |
|
1057 */ |
|
1058 EXTERN CyAsReturnStatus_t |
|
1059 CyAsUsbWriteDataAsync( |
|
1060 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1061 CyAsEndPointNumber_t ep, /* The endpoint to write data to */ |
|
1062 uint32_t dsize, /* The size of the data */ |
|
1063 void * data, /* The buffer containing the data */ |
|
1064 CyBool spacket, /* If true, send a short packet to terminate data */ |
|
1065 CyAsUsbIoCallback callback /* The callback to call when the data is written */ |
|
1066 ) ; |
|
1067 |
|
1068 /* Summary |
|
1069 This function aborts an outstanding asynchronous operation on a given endpoint |
|
1070 |
|
1071 Description |
|
1072 This function aborts any outstanding operation that is pending on the given |
|
1073 endpoint. |
|
1074 |
|
1075 * Valid In Asynchronous Callback: YES |
|
1076 |
|
1077 Returns |
|
1078 * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully |
|
1079 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1080 * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB operation was pending |
|
1081 |
|
1082 See Also |
|
1083 * CyAsUsbReadData |
|
1084 * CyAsUsbReadDataAsync |
|
1085 * CyAsUsbWriteData |
|
1086 * CyAsUsbWriteDataAsync |
|
1087 */ |
|
1088 EXTERN CyAsReturnStatus_t |
|
1089 CyAsUsbCancelAsync( |
|
1090 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1091 CyAsEndPointNumber_t ep /* The endpoint of interest */ |
|
1092 ) ; |
|
1093 |
|
1094 /* Summary |
|
1095 This function sets a stall condition on a given endpoint |
|
1096 |
|
1097 Description |
|
1098 This function sets a stall condition on the given endpoint. If the callback function |
|
1099 is not zero, the function is executed asynchronously and the callback is called when |
|
1100 the function is completed. If the callback function is zero, this function executes |
|
1101 synchronously and will not return until the function has completed. |
|
1102 |
|
1103 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1104 * Nestable: YES |
|
1105 |
|
1106 Returns |
|
1107 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1108 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1109 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1110 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1111 * CY_AS_ERROR_INVALID_HANDLE |
|
1112 * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied) |
|
1113 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1114 * CY_AS_ERROR_INVALID_RESPONSE |
|
1115 |
|
1116 See Also |
|
1117 * CyAsUsbGetStall |
|
1118 * CyAsUsbClearStall |
|
1119 */ |
|
1120 EXTERN CyAsReturnStatus_t |
|
1121 CyAsUsbSetStall( |
|
1122 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1123 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1124 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1125 uint32_t client /* Client supplied data */ |
|
1126 ) ; |
|
1127 |
|
1128 /* Summary |
|
1129 This function clears a stall condition on a given endpoint |
|
1130 |
|
1131 Description |
|
1132 This function clears a stall condition on the given endpoint. If the callback function |
|
1133 is not zero, the function is executed asynchronously and the callback is called when |
|
1134 the function is completed. If the callback function is zero, this function executes |
|
1135 synchronously and will not return until the function has completed. |
|
1136 |
|
1137 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1138 * Nestable: YES |
|
1139 |
|
1140 Returns |
|
1141 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1142 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1143 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1144 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1145 * CY_AS_ERROR_INVALID_HANDLE |
|
1146 * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied) |
|
1147 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1148 * CY_AS_ERROR_INVALID_RESPONSE |
|
1149 |
|
1150 See Also |
|
1151 * CyAsUsbGetStall |
|
1152 * CyAsUsbSetStall |
|
1153 */ |
|
1154 |
|
1155 EXTERN CyAsReturnStatus_t |
|
1156 CyAsUsbClearStall( |
|
1157 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1158 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1159 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1160 uint32_t client /* Client supplied data */ |
|
1161 ) ; |
|
1162 |
|
1163 |
|
1164 /* Summary |
|
1165 This function returns the stall status for a given endpoint |
|
1166 |
|
1167 Description |
|
1168 This function returns the stall status for a given endpoint |
|
1169 |
|
1170 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1171 * Nestable: YES |
|
1172 |
|
1173 Returns |
|
1174 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1175 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1176 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1177 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1178 * CY_AS_ERROR_INVALID_HANDLE |
|
1179 * CY_AS_ERROR_INVALID_IN_CALLBACK |
|
1180 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1181 * CY_AS_ERROR_INVALID_RESPONSE |
|
1182 |
|
1183 See Also |
|
1184 * CyAsUsbGetStall |
|
1185 * CyAsUsbSetStall |
|
1186 * CyAsUsbClearStall |
|
1187 */ |
|
1188 |
|
1189 EXTERN CyAsReturnStatus_t |
|
1190 CyAsUsbGetStall( |
|
1191 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1192 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1193 CyBool * stall_p, /* The return value for the stall state */ |
|
1194 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1195 uint32_t client /* Client supplied data */ |
|
1196 ) ; |
|
1197 |
|
1198 /* Summary |
|
1199 This function sets a NAK condition on a given endpoint |
|
1200 |
|
1201 Description |
|
1202 This function sets a NAK condition on the given endpoint. If the callback function |
|
1203 is not zero, the function is executed asynchronously and the callback is called when |
|
1204 the function is completed. If the callback function is zero, this function executes |
|
1205 synchronously and will not return until the function has completed. |
|
1206 |
|
1207 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1208 * Nestable: YES |
|
1209 |
|
1210 Returns |
|
1211 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1212 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1213 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1214 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1215 * CY_AS_ERROR_INVALID_HANDLE |
|
1216 * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied) |
|
1217 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1218 * CY_AS_ERROR_INVALID_RESPONSE |
|
1219 |
|
1220 See Also |
|
1221 * CyAsUsbGetNak |
|
1222 * CyAsUsbClearNak |
|
1223 */ |
|
1224 EXTERN CyAsReturnStatus_t |
|
1225 CyAsUsbSetNak( |
|
1226 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1227 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1228 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1229 uint32_t client /* Client supplied data */ |
|
1230 ) ; |
|
1231 |
|
1232 /* Summary |
|
1233 This function clears a NAK condition on a given endpoint |
|
1234 |
|
1235 Description |
|
1236 This function clears a NAK condition on the given endpoint. If the callback function |
|
1237 is not zero, the function is executed asynchronously and the callback is called when |
|
1238 the function is completed. If the callback function is zero, this function executes |
|
1239 synchronously and will not return until the function has completed. |
|
1240 |
|
1241 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1242 * Nestable: YES |
|
1243 |
|
1244 Returns |
|
1245 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1246 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1247 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1248 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1249 * CY_AS_ERROR_INVALID_HANDLE |
|
1250 * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied) |
|
1251 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1252 * CY_AS_ERROR_INVALID_RESPONSE |
|
1253 |
|
1254 See Also |
|
1255 * CyAsUsbGetNak |
|
1256 * CyAsUsbSetNak |
|
1257 */ |
|
1258 EXTERN CyAsReturnStatus_t |
|
1259 CyAsUsbClearNak( |
|
1260 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1261 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1262 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1263 uint32_t client /* Client supplied data */ |
|
1264 ) ; |
|
1265 |
|
1266 /* Summary |
|
1267 This function returns the NAK status for a given endpoint |
|
1268 |
|
1269 Description |
|
1270 This function returns the NAK status for a given endpoint |
|
1271 |
|
1272 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1273 * Nestable: YES |
|
1274 |
|
1275 Returns |
|
1276 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1277 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1278 * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint |
|
1279 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1280 * CY_AS_ERROR_INVALID_HANDLE |
|
1281 * CY_AS_ERROR_INVALID_IN_CALLBACK |
|
1282 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1283 * CY_AS_ERROR_INVALID_RESPONSE |
|
1284 |
|
1285 See Also |
|
1286 * CyAsUsbSetNak |
|
1287 * CyAsUsbClearNak |
|
1288 */ |
|
1289 EXTERN CyAsReturnStatus_t |
|
1290 CyAsUsbGetNak( |
|
1291 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1292 CyAsEndPointNumber_t ep, /* The endpoint of interest */ |
|
1293 CyBool * nak_p, /* The return value for the stall state */ |
|
1294 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1295 uint32_t client /* Client supplied data */ |
|
1296 ) ; |
|
1297 |
|
1298 /* Summary |
|
1299 This function triggers a USB remote wakeup from the Processor API |
|
1300 |
|
1301 Description |
|
1302 When there is a Suspend condition on the USB bus, this function programmatically takes the USB bus out of thi suspend state. |
|
1303 |
|
1304 * Valid In Asynchronous Callback: YES (if cb supplied) |
|
1305 * Nestable: YES |
|
1306 |
|
1307 Returns |
|
1308 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1309 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1310 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1311 * CY_AS_ERROR_INVALID_HANDLE |
|
1312 * CY_AS_ERROR_INVALID_IN_CALLBACK |
|
1313 * CY_AS_ERROR_OUT_OF_MEMORY |
|
1314 * CY_AS_ERROR_INVALID_RESPONSE |
|
1315 * CY_AS_ERROR_NOT_IN_SUSPEND |
|
1316 |
|
1317 */ |
|
1318 EXTERN CyAsReturnStatus_t |
|
1319 CyAsUsbSignalRemoteWakeup( |
|
1320 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1321 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1322 uint32_t client /* Client supplied data */ |
|
1323 ) ; |
|
1324 |
|
1325 /* Summary |
|
1326 This function sets the threshold levels for mass storage progress reports from the West Bridge. |
|
1327 |
|
1328 Description |
|
1329 The West Bridge firmware can be configured to track the amount of read/write activity on |
|
1330 the mass storage device, and send progress reports when the activity level has crossed a |
|
1331 threshold level. This function sets the threshold levels for the progress reports. |
|
1332 Set wr_sectors and rd_sectors to 0, if the progress reports are to be turned off. |
|
1333 |
|
1334 * Valid In Asynchronous Callback: Yes (if cb supplied) |
|
1335 * Nestable: Yes |
|
1336 |
|
1337 Returns |
|
1338 * CY_AS_ERROR_SUCCESS - the function succeeded |
|
1339 * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
|
1340 * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device |
|
1341 * CY_AS_ERROR_INVALID_HANDLE - Bad handle |
|
1342 * CY_AS_ERROR_INVALID_IN_CALLBACK - Synchronous call made while in callback |
|
1343 * CY_AS_ERROR_OUT_OF_MEMORY - Failed allocating memory for request processing |
|
1344 * CY_AS_ERROR_NOT_SUPPORTED - Firmware version does not support mass storage progress tracking |
|
1345 * CY_AS_ERROR_INVALID_RESPONSE - Unexpected response from Firmware |
|
1346 |
|
1347 See Also |
|
1348 * CyAsUsbMSCProgressData |
|
1349 * CyAsEventUsbMSCProgress |
|
1350 */ |
|
1351 EXTERN CyAsReturnStatus_t |
|
1352 CyAsUsbSetMSReportThreshold( |
|
1353 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1354 uint32_t wr_sectors, /* Number of sectors written before report is sent */ |
|
1355 uint32_t rd_sectors, /* Number of sectors read before report is sent */ |
|
1356 CyAsFunctionCallback cb, /* The callback if async call */ |
|
1357 uint32_t client /* Client supplied data */ |
|
1358 ) ; |
|
1359 |
|
1360 /* Summary |
|
1361 Specify which of the partitions on a partitioned mass storage device should be made visible to |
|
1362 USB. |
|
1363 |
|
1364 Description |
|
1365 West Bridge firmware supports the creation of upto two partitions on mass storage devices |
|
1366 connected to the West Bridge device. When there are two partitions on a device, the user |
|
1367 can choose which of these partitions should be made visible to the USB host through the |
|
1368 USB mass storage interface. This function allows the user to configure the partitions that |
|
1369 should be enumerated. At least one partition should be selected through this API. If neither |
|
1370 partition needs to be enumerated, use CyAsUsbSetEnumConfig to control this. |
|
1371 |
|
1372 * Valid in Asynchronous callback: Yes (if cb supplied) |
|
1373 * Nestable: Yes |
|
1374 |
|
1375 Returns |
|
1376 * CY_AS_ERROR_SUCCESS - operation completed successfully |
|
1377 * CY_AS_ERROR_INVALID_HANDLE - invalid handle to the West Bridge device |
|
1378 * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured |
|
1379 * CY_AS_ERROR_NO_FIRMWARE - no firmware running on West Bridge device |
|
1380 * CY_AS_ERROR_NOT_RUNNING - USB stack has not been started |
|
1381 * CY_AS_ERROR_IN_SUSPEND - West Bridge device is in suspend mode |
|
1382 * CY_AS_ERROR_INVALID_CALL_SEQUENCE - this API has to be called before CyAsUsbSetEnumConfig |
|
1383 * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process the request |
|
1384 * CY_AS_ERROR_NO_SUCH_UNIT - Storage device addressed has not been partitioned |
|
1385 * CY_AS_ERROR_NOT_SUPPORTED - operation is not supported by active device/firmware. |
|
1386 |
|
1387 See Also |
|
1388 * CyAsStorageCreatePPartition |
|
1389 * CyAsStorageRemovePPartition |
|
1390 * CyAsUsbMsType_t |
|
1391 */ |
|
1392 EXTERN CyAsReturnStatus_t |
|
1393 CyAsUsbSelectMSPartitions ( |
|
1394 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
1395 CyAsBusNumber_t bus, /* Bus index of the device being addressed */ |
|
1396 uint32_t device, /* Device id of the device being addressed */ |
|
1397 CyAsUsbMSType_t type, /* Selection of partitions to be enumerated */ |
|
1398 CyAsFunctionCallback cb, /* The callback, if async call */ |
|
1399 uint32_t client /* Client supplied data */ |
|
1400 ); |
|
1401 |
|
1402 /* For supporting deprecated functions */ |
|
1403 #include "cyasusb_dep.h" |
|
1404 |
|
1405 #include "cyas_cplus_end.h" |
|
1406 |
|
1407 #endif /* _INCLUDED_CYASUSB_H_ */ |