- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The code I'm using was taken directly from the synchronous slave fifo "cyfxslfifosync" example.
Besides the sync slave fifo protocol I need also to control GPIO bits from a control-transfer endpoint.
I found where/how to initialize the desired GPIO bits (done), but I have no clue how to add my code
to change GPIO bits from control endpoint.
I see the bulksrcsink example but I'm having difficulties to figure out how to integrate that with the
cyfxslfifosync code.
Please some hints, directions. Is there a more straightforward example for me to follow ?
Many thanks.
Luis C.
Solved! Go to Solution.
- Tags:
- usb gpio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Luis,
Firstly, define and configure a GPIO that you want to control from the control endpoint.
Please add a vendor request to CyFxSlFifoApplnUSBSetupCB() block and add the desired test case.
Please find the attached .c file with the modified firmware for reference on where to add the vendor requests in the block.
The attached firmware consists of a pin (54) that is toggled when a vendor request 0x76 is transferred to the device from the control centre.
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Luis,
Firstly, define and configure a GPIO that you want to control from the control endpoint.
Please add a vendor request to CyFxSlFifoApplnUSBSetupCB() block and add the desired test case.
Please find the attached .c file with the modified firmware for reference on where to add the vendor requests in the block.
The attached firmware consists of a pin (54) that is toggled when a vendor request 0x76 is transferred to the device from the control centre.
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Yashwant.
That help was great.
Very clear how to init the gpio bits and where to place the code for the vendor request... Thanks.
...
I had replied with more questions but after some effort I managed to find it all
and get it working and edited this reply...
Many thanks.
Luis C.