Skip to content

Commit 3359f8f

Browse files
rmschooleyym
andauthored
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 <[email protected]>
1 parent ef95643 commit 3359f8f

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

internal/usbgadget/hid_keyboard.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ var keyboardConfig = gadgetConfigItem{
1414
path: []string{"functions", "hid.usb0"},
1515
configPath: []string{"hid.usb0"},
1616
attrs: gadgetAttributes{
17-
"protocol": "1",
18-
"subclass": "1",
19-
"report_length": "8",
17+
"protocol": "1",
18+
"subclass": "1",
19+
"report_length": "8",
20+
"no_out_endpoint": "0",
2021
},
2122
reportDesc: keyboardReportDesc,
2223
}

internal/usbgadget/hid_mouse_absolute.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ var absoluteMouseConfig = gadgetConfigItem{
1111
path: []string{"functions", "hid.usb1"},
1212
configPath: []string{"hid.usb1"},
1313
attrs: gadgetAttributes{
14-
"protocol": "2",
15-
"subclass": "0",
16-
"report_length": "6",
14+
"protocol": "2",
15+
"subclass": "0",
16+
"report_length": "6",
17+
"no_out_endpoint": "1",
1718
},
1819
reportDesc: absoluteMouseCombinedReportDesc,
1920
}

internal/usbgadget/hid_mouse_relative.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ var relativeMouseConfig = gadgetConfigItem{
1111
path: []string{"functions", "hid.usb2"},
1212
configPath: []string{"hid.usb2"},
1313
attrs: gadgetAttributes{
14-
"protocol": "2",
15-
"subclass": "1",
16-
"report_length": "4",
14+
"protocol": "2",
15+
"subclass": "1",
16+
"report_length": "4",
17+
"no_out_endpoint": "1",
1718
},
1819
reportDesc: relativeMouseCombinedReportDesc,
1920
}

0 commit comments

Comments
 (0)