dmitrystu / libusb_stm32

Lightweight USB device Stack for STM32 microcontrollers
Apache License 2.0
696 stars 160 forks source link

CDC demo line coding bug? #90

Closed robots closed 3 years ago

robots commented 3 years ago

Hi, I am implementing linecoding to use this library in usb->uart bridge. In the demo code I think there is bug:

https://github.com/dmitrystu/libusb_stm32/blob/master/demo/cdc_loop.c#L311

memcpy( req->data, &cdc_line, sizeof(cdc_line)); should be: memcpy( &cdc_line, req->data, sizeof(cdc_line));

Otherwise it doesn't make sense :-)

dmitrystu commented 3 years ago

Yes, this is a typo. But actually, this is not important for this project because USART not used. Anyway, it will be fixed. Thank you.