mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 15:33:40 +00:00
machine: implement usb receive message throttling
This commit is contained in:
+6
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user