I'm trying to combine the two example projects "USBBulkLoopAuto" and "MouseDemo" but I don't get it running. It is the first time I try to do something with USB and probably struggle with some basic problems.
What I did so far:
- Copied the "USBBulkLoopAuto" Project and renamed it.
- Changed the USB descriptor file where I added the HID (not sure if I did this the right way, file is in the appendix)
- Changed the file names in the Makefile
- Added a single .c and .h file for each interface (cyfx_thread_bulkloop.c, cyfx_thread_bulkloop.h, cyfx_thread_hid.c and cyfx_thread_hid.h)
- made a thread for the bulk loop in "cyfx_thread_bulkloop.c" and a thread for the HID in "cyfx_thread_hid.c" and added the code from the examples.
- Created a main.c file where I put everything in it where I think is shared by both interfaces.
- Merged the functions (probably merged wrong)
- CyFxApplicationDefine calles both threads
- CyFxApplnInit is placed in the main file to set the enumeration descriptor for both interfaces
- CyFxApplnLPMRqtCB, CyFxApplnUSBEventCB, CyFxApplnUSBSetupCB are placed in the main.c but not sure what I have to do actually to combine the functions for both interfaces (To be honest, I don't really understand these functions).
I'm able to build the project without errors, but when I load it on the FX3, I get no device in the Cypress Control Center.
Could someone please help me to get this running or is there already an example with two combined interfaces? I searched but didn't find anything which gave me enough information.
Thank for every hint to get closer to a working solution.
USB_bl_hid.zip 20.6 K