Closed arduino12 closed 1 year ago
CH552 is not a chip with a lot of RAM or ROM so the USB stuff is hard coded and not able to be uninitialized.
If you want to use CDC+HID, check this project
https://github.com/Noteolvides/CubeTouch/tree/main/Examples/CDC_KEYBOARD
Hi,
I want my CH552 to act as a USBSerial (CDC VCP) at start and be able to switch to HID keyboard afterwards. (will be great to keep the USBSerial simultaneously, but switching between them is good enough for me).
I see that the USBSerial (USBCDC.c) is at the core, and the USBHIDKeyboard.c is external, I found
USBInit
but no way to uninitialize the USB HID Keyboard. For USBSerial I didn't found any initialize or uninitialize functions.USBDeinit
function to the USB examples? (maybe name likeKeyboard_begin
,Keyboard_end
,USBSerial_begin
,USBSerial_end
..?)getDTR
andsetDTS
, I saw checking the DTR here).Thanks, Arad :)