aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-07-25 11:11:37 -0400
committerBrian Cully <bjc@kublai.com>2019-07-25 14:43:31 -0400
commitce048a1594ee59d52eb66e6bd46d98b29e0f976a (patch)
tree7f096376b14da50c9345b7527264b81a78ca187b
parent06f52526f987d6d2838fab5bb7edc2dab3fc5d6b (diff)
downloadsamd21-demo-ce048a1594ee59d52eb66e6bd46d98b29e0f976a.tar.gz
samd21-demo-ce048a1594ee59d52eb66e6bd46d98b29e0f976a.zip
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.
-rwxr-xr-xusbh/src/lib.rs4
1 files changed, 1 insertions, 3 deletions
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 => {