Closed xtrinch closed 2 years ago
Thanks, i will revert changes which i posted by accident trying to do USB flashing. Your changes are not quite good, because you are using too many endpoints in webusb, the only change required is in CDC.
When you say I am using too many endpoints in webusb, what do you mean by that? Bear with me I'm a beginner on this :) I thought for sure you need one IN, one OUT endpoint for webusb since it's bidirectional communication?
Yes, you need need 1 IN and 1 OUT and thats fine. What i mean is that IN and OUT endpoints are enumerated the same way and you can use for both the same value, like 0x02 or 0x03. Then 0x80 is used to detect if its IN or OUT, but endpoint number is still 0x02 or 0x03.
Ah ok cool. Yeah I just copied from the example :) Thx for explanation
Hello,
when using cdc & webusb at the same time, the default endpoint addresses actually clash (you can see it in the kernel logs and the device will not function properly), so it seems to me it would be nice that either the defaults are set so that they don't OR there's a line in the README indicating that they need to be overrridden if used together.
In the PR is what I used to un-clash my addresses, mostly copied from tinyusb own example at: https://github.com/hathach/tinyusb/blob/master/examples/device/webusb_serial/src/usb_descriptors.c