Closed robots closed 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));
memcpy( req->data, &cdc_line, sizeof(cdc_line));
memcpy( &cdc_line, req->data, sizeof(cdc_line));
Otherwise it doesn't make sense :-)
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.
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 :-)