machine/usb: refactor endpoint configuration

This commit is contained in:
sago35
2023-08-02 08:30:51 +09:00
committed by Ron Evans
parent 069e4f0d98
commit 395ee2d338
5 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func SetHandler(d hidDevicer) {
machine.ConfigureUSBEndpoint(descriptor.CDCHID,
[]usb.EndpointConfig{
{
No: usb.HID_ENDPOINT_IN,
Index: usb.HID_ENDPOINT_IN,
IsIn: true,
Type: usb.ENDPOINT_TYPE_INTERRUPT,
TxHandler: handler,
@@ -44,7 +44,7 @@ func SetHandler(d hidDevicer) {
},
[]usb.SetupConfig{
{
No: usb.HID_INTERFACE,
Index: usb.HID_INTERFACE,
Handler: setupHandler,
},
})