jsfw/net.ser

64 lines
872 B
Plaintext
Raw Normal View History

2023-05-06 11:42:50 -05:00
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);
2023-05-06 11:42:50 -05:00
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[],
2023-05-06 11:42:50 -05:00
}
Destroy {
index: u16,
}
}