mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
services/usb-device-xous: cleanup
This commit is contained in:
parent
79db9702e3
commit
270c471577
1 changed files with 5 additions and 4 deletions
|
|
@ -27,8 +27,6 @@ use xous_usb_hid::device::DeviceClass;
|
|||
use xous_usb_hid::page::Keyboard;
|
||||
use xous_usb_hid::prelude::*;
|
||||
|
||||
use crate::*;
|
||||
|
||||
/// 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.
|
||||
const EXTENDED_CORE_RESET_MS: usize = 4000;
|
||||
|
|
@ -98,7 +96,7 @@ pub(crate) fn main_hw() -> ! {
|
|||
if soc_ver < minimum_ver {
|
||||
if soc_ver.min != 0 {
|
||||
// don't show during hosted mode, which reports 0.0.0+0
|
||||
tt.sleep_ms(1500).ok(); // wait for some system boot to happen before popping up the modal
|
||||
tt.sleep_ms(1500).ok(); // wait for some system boot to happen before popping up the modal
|
||||
let modals = modals::Modals::new(&xns).unwrap();
|
||||
modals.show_notification(
|
||||
&format!("SoC version >= 0.9.8+20 required for USB HID. Detected rev: {}. Refusing to start USB driver.",
|
||||
|
|
@ -499,7 +497,10 @@ pub(crate) fn main_hw() -> ! {
|
|||
};
|
||||
}
|
||||
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() {
|
||||
Err(e) => log::warn!("USB reset on resume failed: {:?}", e),
|
||||
|
|
|
|||
Loading…
Reference in a new issue