diff options
author | sago35 <[email protected]> | 2023-08-03 20:43:04 +0900 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-08-04 09:43:53 +0200 |
commit | 215dd3f0be095b05dcff7b718ff1ff42e8c1e026 (patch) | |
tree | d72cc258836cf1498647ebf7bf5979179374efb5 | |
parent | c51f5cea0bd4a8c3d7b80544dc6577ddacf947b6 (diff) | |
download | tinygo-215dd3f0be095b05dcff7b718ff1ff42e8c1e026.tar.gz tinygo-215dd3f0be095b05dcff7b718ff1ff42e8c1e026.zip |
machine/usb/hid: rename Handler() to TxHandler()
-rw-r--r-- | src/machine/usb/hid/hid.go | 8 | ||||
-rw-r--r-- | src/machine/usb/hid/keyboard/keyboard.go | 2 | ||||
-rw-r--r-- | src/machine/usb/hid/mouse/mouse.go | 2 |
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 |