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
+6 -1
View File
@@ -319,7 +319,12 @@ func ConfigureUSBEndpoint(desc descriptor.Descriptor, epSettings []usb.EndpointC
} else {
endPoints[ep.Index] = uint32(ep.Type | usb.EndpointOut)
if ep.RxHandler != nil {
usbRxHandler[ep.Index] = ep.RxHandler
usbRxHandler[ep.Index] = func(b []byte) bool {
ep.RxHandler(b)
return true
}
} else if ep.DelayRxHandler != nil {
usbRxHandler[ep.Index] = ep.DelayRxHandler
}
}
if ep.StallHandler != nil {