cli: read hid reports

This commit is contained in:
2026-05-19 00:47:37 -07:00
parent 4c2384fba5
commit c8d3d0409a
6 changed files with 644 additions and 17 deletions
+1
View File
@@ -3,4 +3,5 @@ name = "shared"
edition = "2024"
[dependencies]
deku = { version = "0.20.3", default-features = false }
usbd-hid = { version = "0.10.0" }
+11 -8
View File
@@ -1,17 +1,20 @@
#![no_std]
pub mod hid {
use deku::DekuRead;
use usbd_hid::descriptor::generator_prelude::*;
#[derive(DekuRead)]
#[deku(endian = "little")]
#[gen_hid_descriptor(
(collection = APPLICATION, usage_page = VENDOR_DEFINED_START, usage = 0x01, ) = {
average_buffer_fill=input;
frame_count=input;
dac_underflow_count=input;
usb_underflow_count=input;
dac_overflow_count=input;
}
)]
(collection = APPLICATION, usage_page = VENDOR_DEFINED_START, usage = 0x01, ) = {
average_buffer_fill=input;
frame_count=input;
dac_underflow_count=input;
usb_underflow_count=input;
dac_overflow_count=input;
}
)]
#[repr(C)]
// Note these are all actually u32
pub struct AudioTelemetryReport {