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 {
47
47
/// there is no need to perform a USB reset in this method.
48
48
fn enable ( & mut self ) ;
49
49
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.
52
55
fn reset ( & self ) ;
53
56
54
57
/// Sets the device USB address to `addr`.
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ pub mod endpoint;
156
156
/// loop {
157
157
/// // Must be called more often than once every 10ms to handle events and stay USB compilant,
158
158
/// // or from a device-specific interrupt handler.
159
- /// if (usb_dev.poll(&mut [&mut serial])) {}
159
+ /// if (usb_dev.poll(&mut [&mut serial])) {
160
160
/// // Call class-specific methods here
161
161
/// serial.read(...);
162
162
/// }
You can’t perform that action at this time.
0 commit comments