machine/usb: refactorings to move functionality under machine/usb package

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2022-07-12 22:31:23 +02:00
committed by Ron Evans
parent ea36fea5a9
commit 3c2d2a93d3
9 changed files with 279 additions and 271 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package hid
import (
"errors"
"machine"
"machine/usb"
)
// from usb-hid.go
@@ -48,7 +49,7 @@ func handler() {
}
}
func setupHandler(setup machine.USBSetup) bool {
func setupHandler(setup usb.Setup) bool {
ok := false
if setup.BmRequestType == usb_SET_REPORT_TYPE && setup.BRequest == usb_SET_IDLE {
machine.SendZlp()