Closed test1025 closed 2 years ago
userUsbHidKeyboard can not coexist with userUsbCdc.
You need to merge the code if you want to use both.
Thanks for your reply! My English is not good, sorry!
I mean, I want to use "userusbcdc
" to communicate with the host computer to change the keyboard key value
I want to use an IO of ch552 to control the code entering "userusbcdc"
or "userusbhidkeyboard"
I tried to add the loop in the two files in the example to while (1) and then convert it into a function and put it in the setup function. Only after "/src" was placed in the folder of "userusbcdc", the code of running userusbcdc was normal, but after I put the file of userusbhidkeyboard into the file, the same code was brushed into ch552 and the system recognized it as "hidkeyboard"
, or vice versa
Could you tell me what I did wrong? What should I do? I'm not very familiar with Arduino
This problem has been bothering me for a week.......TxT....
If you can help me, I'd like to thank you very much
Think !^_^
Both userusbcdc and userusbhidkeyboard contains USBhandler.c and USBconstant.c, and that create a conflict.
You will need to merge those files to one, and adjust usb descriptors and handlers. That does not require any Arduino specific knowledge, but it requires knowledge of USB communication.
Both userusbcdc and userusbhidkeyboard contains USBhandler.c and USBconstant.c, and that create a conflict.
You will need to merge those files to one, and adjust usb descriptors and handlers. That does not require any Arduino specific knowledge, but it requires knowledge of USB communication.
After a day's hard work, I still haven't solved this problem .. Thank you very much for your reply
src文件夹内包含userUsbHidKeyboard和userUsbCdc的文件夹时上传什么都会识别成keyboard