mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
machine: implement usb receive message throttling
This commit is contained in:
@@ -98,10 +98,9 @@ func handleUSBIRQ(intr interrupt.Interrupt) {
|
||||
for i := 0; i < 16; i++ {
|
||||
if s2&(1<<(i*2+1)) > 0 {
|
||||
buf := handleEndpointRx(uint32(i))
|
||||
if usbRxHandler[i] != nil {
|
||||
usbRxHandler[i](buf)
|
||||
if usbRxHandler[i] == nil || usbRxHandler[i](buf) {
|
||||
AckUsbOutTransfer(uint32(i))
|
||||
}
|
||||
handleEndpointRxComplete(uint32(i))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user