arduino / ArduinoCore-samd

Arduino Core for SAMD21 CPU
GNU Lesser General Public License v2.1
464 stars 713 forks source link

[Question] usbcore #438

Closed GMagician closed 4 years ago

GMagician commented 4 years ago

I was having issues on Adafruit grand central M4, Marlin was sending chars and they were lost, I checked code and found this:

if (usbd.epBank1IsReady(ep)) {
            // previous transfer is still not complete

is it correct? or it should be

if (!usbd.epBank1IsReady(ep)) {
            // previous transfer is still not complete

as I found after some search, my issue was in Tinyusb implementation and I fixed it, but I ask here about this doubt. I didn't dig into code and also my assumption of how usb endpoints work may be completely wrong (don't know much about it) but I just read comment (if previous is still not complete I though ep should be not ready)...

sandeepmistry commented 4 years ago

Hi @GMagician,

Have you observed this behaviour also on a SAMD21 based board? This core only supports the SAMD21 ...

GMagician commented 4 years ago

Don't have samd21 boards, just samd51. What I report here is mostly a doubt...