Simplify hid output report handling

This commit is contained in:
alexmoon
2022-04-02 11:58:01 -04:00
committed by Dario Nieuwenhuis
parent c8ad82057d
commit 99f95a33c3
5 changed files with 78 additions and 187 deletions

View File

@ -52,7 +52,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
let mut control_buf = [0; 16];
let request_handler = MyRequestHandler {};
let mut state = State::<5, 0>::new();
let mut control = State::<5, 0>::new();
let mut builder = UsbDeviceBuilder::new(
driver,
@ -66,7 +66,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Create classes on the builder.
let mut hid = HidClass::new(
&mut builder,
&mut state,
&mut control,
MouseReport::desc(),
Some(&request_handler),
60,