From ce048a1594ee59d52eb66e6bd46d98b29e0f976a Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 25 Jul 2019 11:11:37 -0400 Subject: Only reset USB during initialization state. USBHost::new() sets up the state machine to initialize immediately, so rely on that, rather than initializing twice on CPU reset. --- usbh/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'usbh') diff --git a/usbh/src/lib.rs b/usbh/src/lib.rs index 4e6b8bf..cbf9e66 100755 --- a/usbh/src/lib.rs +++ b/usbh/src/lib.rs @@ -179,8 +179,6 @@ where .expect("Could not get clock 6"); clocks.usb(&gclk6); - rc.reset_periph(); - let usbp = &rc.usb as *const _ as usize; (rc, move || handler(usbp, &mut eventw)) } @@ -252,7 +250,7 @@ where if let TaskState::Detached(_) = self.task_state { self.task_state } else { - TaskState::Detached(DetachedState::Initialize) + } } Event::Attached => { -- cgit v1.2.3