services/usb-device-xous: cleanup

This commit is contained in:
Gianguido Sora 2024-01-30 19:04:58 +01:00
parent 79db9702e3
commit 270c471577

View file

@ -27,8 +27,6 @@ use xous_usb_hid::device::DeviceClass;
use xous_usb_hid::page::Keyboard; use xous_usb_hid::page::Keyboard;
use xous_usb_hid::prelude::*; use xous_usb_hid::prelude::*;
use crate::*;
/// Time allowed for switchover between device core types. It's longer because some hosts /// Time allowed for switchover between device core types. It's longer because some hosts
/// get really confused when you have the same VID/PID show up with a different set of endpoints. /// get really confused when you have the same VID/PID show up with a different set of endpoints.
const EXTENDED_CORE_RESET_MS: usize = 4000; const EXTENDED_CORE_RESET_MS: usize = 4000;
@ -499,7 +497,10 @@ pub(crate) fn main_hw() -> ! {
}; };
} }
Views::HIDv2 => { Views::HIDv2 => {
hidv2.force_reset() match hidv2.force_reset() {
Err(e) => log::warn!("USB reset on resume failed: {:?}", e),
_ => (),
};
} }
Views::Serial => match serial_device.force_reset() { Views::Serial => match serial_device.force_reset() {
Err(e) => log::warn!("USB reset on resume failed: {:?}", e), Err(e) => log::warn!("USB reset on resume failed: {:?}", e),