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.
code_snippet.txt.zip 1.0 K
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?