machine: implement usb receive message throttling

This commit is contained in:
Michael Smith
2025-06-09 10:14:16 -04:00
committed by Ron Evans
parent b059de857c
commit ba274008d5
8 changed files with 31 additions and 26 deletions
+2 -3
View File
@@ -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))
}
}