From 7f3601e081f71776d3b5f9fc58d5e1adda7772a3 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Tue, 30 Jul 2019 18:26:10 -0400 Subject: WIP: Holy smokes I read my first keyboard report. Too bad it's still trfail town after the first, but progress! --- usbh/src/device.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usbh/src/device.rs') diff --git a/usbh/src/device.rs b/usbh/src/device.rs index aaf82d1..6efc395 100644 --- a/usbh/src/device.rs +++ b/usbh/src/device.rs @@ -225,7 +225,7 @@ impl Device { debug!(" -- idle set"); debug!("+++ setting report"); - let mut rep_res: u8 = 0; + let mut report: u8 = 0; pipe.control_transfer( RequestType::from(( RequestDirection::HostToDevice, @@ -235,10 +235,10 @@ impl Device { RequestCode::SetConfiguration, WValue::from((0, 2)), 0, - Some(&mut rep_res), + Some(&mut report), self.millis, )?; - debug!(" -- report set: {}", rep_res); + debug!(" -- report set"); self.state = FSM::GetReport(3) } @@ -276,7 +276,7 @@ impl Device { } fn read_report(&mut self, pipe: &mut Pipe, id: u8) { - let mut buf: core::mem::MaybeUninit<[u8; 64]> = core::mem::MaybeUninit::uninit(); + let mut buf: core::mem::MaybeUninit<[u8; 8]> = core::mem::MaybeUninit::uninit(); match pipe.in_transfer(&mut buf, 15, self.millis) { Ok(bytes_received) => { let tmp = unsafe { &(buf.assume_init())[..bytes_received] }; -- cgit v1.2.3