1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use *;
input_data=input;
};
= ;
}
)]
pub
// TODO: Composite hid report
// KeyboardReport describes a report and its companion descriptor that can be
// used to send keyboard button presses to a host and receive the status of the
// keyboard LEDs.
// #[gen_hid_descriptor(
// (report_id = 0x01, collection = APPLICATION, usage_page = GENERIC_DESKTOP, usage = KEYBOARD) = {
// (usage_page = KEYBOARD, usage_min = 0xE0, usage_max = 0xE7) = {
// #[packed_bits 8] #[item_settings data,variable,absolute] modifier=input;
// };
// (usage_min = 0x00, usage_max = 0xFF) = {
// #[item_settings constant,variable,absolute] reserved=input;
// };
// (usage_page = LEDS, usage_min = 0x01, usage_max = 0x05) = {
// #[packed_bits 5] #[item_settings data,variable,absolute] leds=output;
// };
// (usage_page = KEYBOARD, usage_min = 0x00, usage_max = 0xDD) = {
// #[item_settings data,array,absolute] keycodes=input;
// };
// },
// (report_id = 0x02, collection = APPLICATION, usage_page = CONSUMER, usage = CONSUMER_CONTROL) = {
// (usage_page = CONSUMER, usage_min = 0x00, usage_max = 0x514) = {
// #[item_settings data,array,absolute,not_null] usage_id=input;
// };
// },
// (report_id = 0x03, collection = APPLICATION, usage_page = GENERIC_DESKTOP, usage = SYSTEM_CONTROL) = {
// (usage_min = 0x81, usage_max = 0xB7, logical_min = 1) = {
// #[item_settings data,array,absolute,not_null] usage_id=input;
// };
// }
// )]
// #[allow(dead_code)]
// pub struct MyKeyboardReport {
// pub(crate) modifier: u8,
// pub(crate) reserved: u8,
// pub(crate) leds: u8,
// pub(crate) keycodes: [u8; 6],
// pub(crate) usage_id: u16,
// }
// impl AsInputReport for MyKeyboardReport {
// }