Closed nerdralph closed 3 years ago
The string descriptors are a bit verbose as u8. defining them as u16 makes the code a bit cleaner:
__code uint16_t SerDes[]={ 0x030E, 'C','H','5','5','x' };
Or if you are willing to define a struct for each descriptor, you can use UTF-16 string constants like I do here; https://github.com/nerdralph/ch554_sdcc_usb_blinky/blob/master/projects/include/usb_intr.h#L24
That's cool. Thanks for suggestion. Will take a look.
Fixed in https://github.com/DeqingSun/ch55xduino/commit/4b80e0edf368f21f40d85da487f5b800aefe1ccf Will be merged into main branch in the next release.
The string descriptors are a bit verbose as u8. defining them as u16 makes the code a bit cleaner:
Or if you are willing to define a struct for each descriptor, you can use UTF-16 string constants like I do here; https://github.com/nerdralph/ch554_sdcc_usb_blinky/blob/master/projects/include/usb_intr.h#L24