-
Notifications
You must be signed in to change notification settings - Fork 1
/
net.ser
63 lines (55 loc) · 872 Bytes
/
net.ser
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
60
61
62
63
struct Abs {
id: u16,
min: u32,
max: u32,
fuzz: u32,
flat: u32,
res: u32,
}
struct Rel {
id: u16,
}
struct Key {
id: u16,
}
const ABS_CNT = 64;
const REL_CNT = 16;
const KEY_CNT = 768;
struct Tag {
name: char[],
}
struct TagList {
tags: Tag[],
}
version(1);
messages Device {
Info {
slot: u8,
index: u8,
abs: Abs[^ABS_CNT],
rel: Rel[^REL_CNT],
key: Key[^KEY_CNT],
}
Report {
slot: u8,
index: u8,
abs: u32[^ABS_CNT],
rel: u32[^REL_CNT],
key: u8[^KEY_CNT],
}
ControllerState {
index: u16,
led: u8[3],
small_rumble: u8,
big_rumble: u8,
flash_on: u8,
flash_off: u8,
}
#[versioned]
Request {
requests: TagList[],
}
Destroy {
index: u16,
}
}