- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In UVC firmware, when a GPIO key pressed, in the GPIO interruption function I want to send a code like 0xFF to PC Host software, So it can take some action like turn on the LED. So how can I realized the function.I want some example application code for this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!,
In Fx3 UVC example project, endpoint 0x82 is used as a Status Interrupt endpoint. You can use this endpoint or define another Interrupt endpoint to send the status code to PC.
You need to create a DMA Channel from CPU to this Interrupt Endpoint.
You can refer to cyfxgpioapp example project provided in FX3 SDK for the usage of GPIO interrupts (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples)
In the GPIO Interrupt callback, you can set a flag to indicate a button press. Inside the for (;;) loop of UVCAppThread_Entry(), you need to check if the flag is set. If the flag is set, clear the flag and call a function; say, Send_Status_to_Host().
Please find the attached code snippet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!,
In Fx3 UVC example project, endpoint 0x82 is used as a Status Interrupt endpoint. You can use this endpoint or define another Interrupt endpoint to send the status code to PC.
You need to create a DMA Channel from CPU to this Interrupt Endpoint.
You can refer to cyfxgpioapp example project provided in FX3 SDK for the usage of GPIO interrupts (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples)
In the GPIO Interrupt callback, you can set a flag to indicate a button press. Inside the for (;;) loop of UVCAppThread_Entry(), you need to check if the flag is set. If the flag is set, clear the flag and call a function; say, Send_Status_to_Host().
Please find the attached code snippet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rghe,
In my project, I use the sample code provided by you to send key status to host.
In order to get the data sent by Send_Status_to_Host(), how can I do on the PC side?