Remove Out Endpoint Descriptors from Absolute Mouse and Relative Mouse (#542)

* Update hid_mouse_absolute.go

Added attribute to remove unnecessary out endpoint.

* Update hid_mouse_relative.go

Added attribute to remove unnecessary out endpoint.

* Update hid_keyboard.go

Added attribute to explicitly keep currently needed out endpoint and to make listed attributes consistent across the keyboard and mouse devices.

---------

Co-authored-by: Aveline <352441+ym@users.noreply.github.com>
This commit is contained in:
rmschooley 2025-07-11 10:43:37 -05:00 committed by GitHub
parent ef95643a86
commit 3359f8fca4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

View File

@ -14,9 +14,10 @@ var keyboardConfig = gadgetConfigItem{
path: []string{"functions", "hid.usb0"}, path: []string{"functions", "hid.usb0"},
configPath: []string{"hid.usb0"}, configPath: []string{"hid.usb0"},
attrs: gadgetAttributes{ attrs: gadgetAttributes{
"protocol": "1", "protocol": "1",
"subclass": "1", "subclass": "1",
"report_length": "8", "report_length": "8",
"no_out_endpoint": "0",
}, },
reportDesc: keyboardReportDesc, reportDesc: keyboardReportDesc,
} }

View File

@ -11,9 +11,10 @@ var absoluteMouseConfig = gadgetConfigItem{
path: []string{"functions", "hid.usb1"}, path: []string{"functions", "hid.usb1"},
configPath: []string{"hid.usb1"}, configPath: []string{"hid.usb1"},
attrs: gadgetAttributes{ attrs: gadgetAttributes{
"protocol": "2", "protocol": "2",
"subclass": "0", "subclass": "0",
"report_length": "6", "report_length": "6",
"no_out_endpoint": "1",
}, },
reportDesc: absoluteMouseCombinedReportDesc, reportDesc: absoluteMouseCombinedReportDesc,
} }

View File

@ -11,9 +11,10 @@ var relativeMouseConfig = gadgetConfigItem{
path: []string{"functions", "hid.usb2"}, path: []string{"functions", "hid.usb2"},
configPath: []string{"hid.usb2"}, configPath: []string{"hid.usb2"},
attrs: gadgetAttributes{ attrs: gadgetAttributes{
"protocol": "2", "protocol": "2",
"subclass": "1", "subclass": "1",
"report_length": "4", "report_length": "4",
"no_out_endpoint": "1",
}, },
reportDesc: relativeMouseCombinedReportDesc, reportDesc: relativeMouseCombinedReportDesc,
} }