File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,11 @@ pub trait UsbBus: Sync + Sized {
4747 /// there is no need to perform a USB reset in this method.
4848 fn enable ( & mut self ) ;
4949
50- /// Performs a USB reset. This method should reset the platform-specific peripheral as well as
51- /// ensure that all endpoints previously allocate with alloc_ep are initialized as specified.
50+ /// Called when the host resets the device. This will be soon called after
51+ /// [`poll`](crate::device::UsbDevice::poll) returns [`PollResult::Reset`]. This method should
52+ /// reset the state of all endpoints and peripheral flags back to a state suitable for
53+ /// enumeration, as well as ensure that all endpoints previously allocated with alloc_ep are
54+ /// initialized as specified.
5255 fn reset ( & self ) ;
5356
5457 /// Sets the device USB address to `addr`.
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ pub mod endpoint;
156156/// loop {
157157/// // Must be called more often than once every 10ms to handle events and stay USB compilant,
158158/// // or from a device-specific interrupt handler.
159- /// if (usb_dev.poll(&mut [&mut serial])) {}
159+ /// if (usb_dev.poll(&mut [&mut serial])) {
160160/// // Call class-specific methods here
161161/// serial.read(...);
162162/// }
You can’t perform that action at this time.
0 commit comments