aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsago35 <[email protected]>2023-08-03 20:43:04 +0900
committerRon Evans <[email protected]>2023-08-04 09:43:53 +0200
commit215dd3f0be095b05dcff7b718ff1ff42e8c1e026 (patch)
treed72cc258836cf1498647ebf7bf5979179374efb5
parentc51f5cea0bd4a8c3d7b80544dc6577ddacf947b6 (diff)
downloadtinygo-215dd3f0be095b05dcff7b718ff1ff42e8c1e026.tar.gz
tinygo-215dd3f0be095b05dcff7b718ff1ff42e8c1e026.zip
machine/usb/hid: rename Handler() to TxHandler()
-rw-r--r--src/machine/usb/hid/hid.go8
-rw-r--r--src/machine/usb/hid/keyboard/keyboard.go2
-rw-r--r--src/machine/usb/hid/mouse/mouse.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/machine/usb/hid/hid.go b/src/machine/usb/hid/hid.go
index e3948dc41..f7f1ff66b 100644
--- a/src/machine/usb/hid/hid.go
+++ b/src/machine/usb/hid/hid.go
@@ -23,7 +23,7 @@ const (
)
type hidDevicer interface {
- Handler() bool
+ TxHandler() bool
RxHandler([]byte) bool
}
@@ -40,7 +40,7 @@ func SetHandler(d hidDevicer) {
Index: usb.HID_ENDPOINT_IN,
IsIn: true,
Type: usb.ENDPOINT_TYPE_INTERRUPT,
- TxHandler: handler,
+ TxHandler: txHandler,
},
},
[]usb.SetupConfig{
@@ -55,12 +55,12 @@ func SetHandler(d hidDevicer) {
size++
}
-func handler() {
+func txHandler() {
for _, d := range devices {
if d == nil {
continue
}
- if done := d.Handler(); done {
+ if done := d.TxHandler(); done {
return
}
}
diff --git a/src/machine/usb/hid/keyboard/keyboard.go b/src/machine/usb/hid/keyboard/keyboard.go
index d39321410..237d79419 100644
--- a/src/machine/usb/hid/keyboard/keyboard.go
+++ b/src/machine/usb/hid/keyboard/keyboard.go
@@ -81,7 +81,7 @@ func newKeyboard() *keyboard {
}
}
-func (kb *keyboard) Handler() bool {
+func (kb *keyboard) TxHandler() bool {
kb.waitTxc = false
if b, ok := kb.buf.Get(); ok {
kb.waitTxc = true
diff --git a/src/machine/usb/hid/mouse/mouse.go b/src/machine/usb/hid/mouse/mouse.go
index 024c1e9c3..d790bdbb8 100644
--- a/src/machine/usb/hid/mouse/mouse.go
+++ b/src/machine/usb/hid/mouse/mouse.go
@@ -47,7 +47,7 @@ func newMouse() *mouse {
}
}
-func (m *mouse) Handler() bool {
+func (m *mouse) TxHandler() bool {
m.waitTxc = false
if b, ok := m.buf.Get(); ok {
m.waitTxc = true