machine/usb: refactoring descriptors into subpackage for modularity

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2023-04-02 12:12:32 +02:00
committed by Ron Evans
parent 6a2dd35fe6
commit 2ab7ee6a8a
15 changed files with 1190 additions and 266 deletions
+7 -16
View File
@@ -23,16 +23,6 @@ const (
ENDPOINT_TYPE_BULK = 0x02
ENDPOINT_TYPE_INTERRUPT = 0x03
DEVICE_DESCRIPTOR_TYPE = 1
CONFIGURATION_DESCRIPTOR_TYPE = 2
STRING_DESCRIPTOR_TYPE = 3
INTERFACE_DESCRIPTOR_TYPE = 4
ENDPOINT_DESCRIPTOR_TYPE = 5
DEVICE_QUALIFIER = 6
OTHER_SPEED_CONFIGURATION = 7
SET_REPORT_TYPE = 33
HID_REPORT_TYPE = 34
EndpointOut = 0x00
EndpointIn = 0x80
@@ -51,12 +41,13 @@ const (
SET_INTERFACE = 11
// non standard requests
GET_REPORT = 1
GET_IDLE = 2
GET_PROTOCOL = 3
SET_REPORT = 9
SET_IDLE = 10
SET_PROTOCOL = 11
GET_REPORT = 1
GET_IDLE = 2
GET_PROTOCOL = 3
SET_REPORT = 9
SET_IDLE = 10
SET_PROTOCOL = 11
SET_REPORT_TYPE = 33
DEVICE_CLASS_COMMUNICATIONS = 0x02
DEVICE_CLASS_HUMAN_INTERFACE = 0x03