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 cdc
import (
"errors"
"machine"
"machine/usb"
"runtime/interrupt"
)
@@ -128,7 +129,7 @@ func cdcCallbackRx(b []byte) {
}
}
func cdcSetup(setup machine.USBSetup) bool {
func cdcSetup(setup usb.Setup) bool {
if setup.BmRequestType == usb_REQUEST_DEVICETOHOST_CLASS_INTERFACE {
if setup.BRequest == usb_CDC_GET_LINE_CODING {
var b [cdcLineInfoSize]byte