netget/server/usb/
common.rs1pub mod device_class {
15 pub const USE_INTERFACE: u8 = 0x00;
16 pub const AUDIO: u8 = 0x01;
17 pub const COMM: u8 = 0x02; pub const HID: u8 = 0x03; pub const PHYSICAL: u8 = 0x05;
20 pub const IMAGE: u8 = 0x06;
21 pub const PRINTER: u8 = 0x07;
22 pub const MASS_STORAGE: u8 = 0x08;
23 pub const HUB: u8 = 0x09;
24 pub const CDC_DATA: u8 = 0x0a;
25 pub const SMART_CARD: u8 = 0x0b;
26 pub const CONTENT_SECURITY: u8 = 0x0d;
27 pub const VIDEO: u8 = 0x0e;
28 pub const PERSONAL_HEALTHCARE: u8 = 0x0f;
29 pub const AUDIO_VIDEO: u8 = 0x10;
30 pub const DIAGNOSTIC: u8 = 0xdc;
31 pub const WIRELESS: u8 = 0xe0;
32 pub const MISCELLANEOUS: u8 = 0xef;
33 pub const APPLICATION_SPECIFIC: u8 = 0xfe;
34 pub const VENDOR_SPECIFIC: u8 = 0xff;
35}
36
37pub mod descriptor_type {
39 pub const DEVICE: u8 = 0x01;
40 pub const CONFIGURATION: u8 = 0x02;
41 pub const STRING: u8 = 0x03;
42 pub const INTERFACE: u8 = 0x04;
43 pub const ENDPOINT: u8 = 0x05;
44 pub const DEVICE_QUALIFIER: u8 = 0x06;
45 pub const OTHER_SPEED_CONFIGURATION: u8 = 0x07;
46 pub const INTERFACE_POWER: u8 = 0x08;
47 pub const HID: u8 = 0x21;
48 pub const HID_REPORT: u8 = 0x22;
49 pub const HID_PHYSICAL: u8 = 0x23;
50}
51
52pub mod request_type {
54 pub const HOST_TO_DEVICE: u8 = 0x00;
56 pub const DEVICE_TO_HOST: u8 = 0x80;
57
58 pub const STANDARD: u8 = 0x00;
60 pub const CLASS: u8 = 0x20;
61 pub const VENDOR: u8 = 0x40;
62
63 pub const DEVICE: u8 = 0x00;
65 pub const INTERFACE: u8 = 0x01;
66 pub const ENDPOINT: u8 = 0x02;
67 pub const OTHER: u8 = 0x03;
68}
69
70pub mod request {
72 pub const GET_STATUS: u8 = 0x00;
73 pub const CLEAR_FEATURE: u8 = 0x01;
74 pub const SET_FEATURE: u8 = 0x03;
75 pub const SET_ADDRESS: u8 = 0x05;
76 pub const GET_DESCRIPTOR: u8 = 0x06;
77 pub const SET_DESCRIPTOR: u8 = 0x07;
78 pub const GET_CONFIGURATION: u8 = 0x08;
79 pub const SET_CONFIGURATION: u8 = 0x09;
80 pub const GET_INTERFACE: u8 = 0x0a;
81 pub const SET_INTERFACE: u8 = 0x0b;
82 pub const SYNCH_FRAME: u8 = 0x0c;
83}
84
85pub mod hid_request {
87 pub const GET_REPORT: u8 = 0x01;
88 pub const GET_IDLE: u8 = 0x02;
89 pub const GET_PROTOCOL: u8 = 0x03;
90 pub const SET_REPORT: u8 = 0x09;
91 pub const SET_IDLE: u8 = 0x0a;
92 pub const SET_PROTOCOL: u8 = 0x0b;
93}
94
95pub mod cdc_request {
107 pub const SEND_ENCAPSULATED_COMMAND: u8 = 0x00;
108 pub const GET_ENCAPSULATED_RESPONSE: u8 = 0x01;
109 pub const SET_LINE_CODING: u8 = 0x20;
110 pub const GET_LINE_CODING: u8 = 0x21;
111 pub const SET_CONTROL_LINE_STATE: u8 = 0x22;
112 pub const SEND_BREAK: u8 = 0x23;
113}
114
115pub mod transfer_type {
117 pub const CONTROL: u8 = 0;
118 pub const ISOCHRONOUS: u8 = 1;
119 pub const BULK: u8 = 2;
120 pub const INTERRUPT: u8 = 3;
121}