remove suspendable
field from embassy_usb::builder::Config
This commit is contained in:
parent
6181646314
commit
c4d9feb36e
@ -94,15 +94,6 @@ pub struct Config<'a> {
|
|||||||
/// Default: 100mA
|
/// Default: 100mA
|
||||||
/// Max: 500mA
|
/// Max: 500mA
|
||||||
pub max_power: u16,
|
pub max_power: u16,
|
||||||
|
|
||||||
/// Allow the bus to be suspended.
|
|
||||||
///
|
|
||||||
/// If set to `true`, the bus will put itself in the suspended state
|
|
||||||
/// when it receives a `driver::Event::Suspend` bus event. If you wish
|
|
||||||
/// to override this behavior, set this field to `false`.
|
|
||||||
///
|
|
||||||
/// Default: `true`
|
|
||||||
pub suspendable: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Config<'a> {
|
impl<'a> Config<'a> {
|
||||||
@ -123,7 +114,6 @@ impl<'a> Config<'a> {
|
|||||||
supports_remote_wakeup: false,
|
supports_remote_wakeup: false,
|
||||||
composite_with_iads: false,
|
composite_with_iads: false,
|
||||||
max_power: 100,
|
max_power: 100,
|
||||||
suspendable: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,11 +471,9 @@ impl<'d, D: Driver<'d>> Inner<'d, D> {
|
|||||||
}
|
}
|
||||||
Event::Suspend => {
|
Event::Suspend => {
|
||||||
trace!("usb: suspend");
|
trace!("usb: suspend");
|
||||||
if self.config.suspendable {
|
self.suspended = true;
|
||||||
self.suspended = true;
|
for h in &mut self.handlers {
|
||||||
for h in &mut self.handlers {
|
h.suspended(true);
|
||||||
h.suspended(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::PowerDetected => {
|
Event::PowerDetected => {
|
||||||
|
Loading…
Reference in New Issue
Block a user