- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The USBFS_ReadOutEP() API doesn't allow you to read from EP0:
if ((pData != NULL) && (epNumber > USBFS_EP0) && (epNumber < USBFS_MAX_EP))
However, the Windows/Linux bundled boot mode drivers for my boot mode device requires reading data from EP0. How can this be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kindly refer to Example on how to use the USB control EndPoint EP0 for information on how to handle EP0. I repeat the last post here again:
For the functions like USBFS_ReadOutEP(), the valid value of endpoint number ranges from 1 to 8. You cannot give 0 for the endpoint number parameter in it.
As already mentioned by Len you can use the USBFS_EP_0_ISR_ExitCallback() and USBFS_EP_0_ISR_EntryCallback() ISR's located in the USBFS_dvrc.c . These ISR's are triggered to handle control transfers directed to endpoint.
To use these ISRs you need to define USBFS_EP_0_ISR_ENTRY_CALLBACK (or USBFS_EP_0_ISR_EXIT_CALLBACK) in the cyapicallbacks.h as shown in the image below:
Then define the USBFS_EP_0_ISR_EntryCallback() function in the main.c to perform the desired function.