Make Driver::disable async and fix comment
This commit is contained in:
@ -57,6 +57,9 @@ pub trait Driver<'a> {
|
||||
|
||||
pub trait Bus {
|
||||
type EnableFuture<'a>: Future<Output = ()> + 'a
|
||||
where
|
||||
Self: 'a;
|
||||
type DisableFuture<'a>: Future<Output = ()> + 'a
|
||||
where
|
||||
Self: 'a;
|
||||
type PollFuture<'a>: Future<Output = Event> + 'a
|
||||
@ -71,7 +74,7 @@ pub trait Bus {
|
||||
fn enable(&mut self) -> Self::EnableFuture<'_>;
|
||||
|
||||
/// Disables and powers down the USB peripheral.
|
||||
fn disable(&mut self);
|
||||
fn disable(&mut self) -> Self::DisableFuture<'_>;
|
||||
|
||||
fn poll<'a>(&'a mut self) -> Self::PollFuture<'a>;
|
||||
|
||||
@ -103,8 +106,6 @@ pub trait Bus {
|
||||
|
||||
/// Initiates a remote wakeup of the host by the device.
|
||||
///
|
||||
/// The default implementation just returns `Unsupported`.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// * [`Unsupported`](crate::UsbError::Unsupported) - This UsbBus implementation doesn't support
|
||||
|
Reference in New Issue
Block a user