chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
473 stars 70 forks source link

Fix the error of crashing when sending multiple characters via cdc #108

Closed Steffen-W closed 1 year ago

Steffen-W commented 1 year ago

Fixes the problem of buffer processing.

Correction affects the function size_t CDCusb::write(const uint8_t *buffer, size_t size)

Crashes due to the use of this function are avoided. Likewise, crashing due to the use of printf is avoided. This function uses CDCusb::write. Please merge.

chegewara commented 1 year ago

Could you please cleanup it and make 1 commit?

Steffen-W commented 1 year ago

I can do that with pleasure. Do you agree with the suggestions?

Steffen-W commented 1 year ago

The code works with a Linux as well as windows pc. I had tested it at least for msc and cdc.

chegewara commented 1 year ago

Thanks @Steffen-W