machine/usb/hid: rename Handler() to TxHandler()

Этот коммит содержится в:
sago35 2023-08-03 20:43:04 +09:00 коммит произвёл Ron Evans
родитель c51f5cea0b
коммит 215dd3f0be
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -23,7 +23,7 @@ const (
) )
type hidDevicer interface { type hidDevicer interface {
Handler() bool TxHandler() bool
RxHandler([]byte) bool RxHandler([]byte) bool
} }
@ -40,7 +40,7 @@ func SetHandler(d hidDevicer) {
Index: usb.HID_ENDPOINT_IN, Index: usb.HID_ENDPOINT_IN,
IsIn: true, IsIn: true,
Type: usb.ENDPOINT_TYPE_INTERRUPT, Type: usb.ENDPOINT_TYPE_INTERRUPT,
TxHandler: handler, TxHandler: txHandler,
}, },
}, },
[]usb.SetupConfig{ []usb.SetupConfig{
@ -55,12 +55,12 @@ func SetHandler(d hidDevicer) {
size++ size++
} }
func handler() { func txHandler() {
for _, d := range devices { for _, d := range devices {
if d == nil { if d == nil {
continue continue
} }
if done := d.Handler(); done { if done := d.TxHandler(); done {
return return
} }
} }

Просмотреть файл

@ -81,7 +81,7 @@ func newKeyboard() *keyboard {
} }
} }
func (kb *keyboard) Handler() bool { func (kb *keyboard) TxHandler() bool {
kb.waitTxc = false kb.waitTxc = false
if b, ok := kb.buf.Get(); ok { if b, ok := kb.buf.Get(); ok {
kb.waitTxc = true kb.waitTxc = true

Просмотреть файл

@ -47,7 +47,7 @@ func newMouse() *mouse {
} }
} }
func (m *mouse) Handler() bool { func (m *mouse) TxHandler() bool {
m.waitTxc = false m.waitTxc = false
if b, ok := m.buf.Get(); ok { if b, ok := m.buf.Get(); ok {
m.waitTxc = true m.waitTxc = true