Here you are going to send the data from CPU to USB socket (endpoint). So the prod socket must be CPU and cons socket must be a UIB_CONS_SOCKET. When CPU is producer, the channel type must always be MANUL_OUT.
The notification is optional. There is no need to set the notification to PROD_EVENT. This is because, it is you (CPU) who are filling the buffer in case of MANUAL_OUT channel. So you do not have to get a notification after you fill the buffer.
You have to use the CyU3PDmaChannelGetBuffer for getting the pointer to a buffer, fill it and use CyU3PDmaChannelCommitBuffer API to send the buffer to PC.
I have attached a project in which uses interrupt endpoint. This firmware enumertaes FX3 into a HID Mouse device. As soon as you load the firmware into FX3, FX3 becomes a mouse and it continuously sends character "a" to the PC.
- Madhu Sudhan
HID_Keyboard_A.zip 1.2 MB
Hey Madhu that helps a lot. I'll post again when it is all working.
It's all working now thanks!