From fd9fb1cbcc1b14bf5cc47a2f335b68ad580b25f5 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 9 Jun 2022 00:28:48 +0800 Subject: [PATCH] fix hosted mode --- services/usb-device-xous/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/usb-device-xous/src/main.rs b/services/usb-device-xous/src/main.rs index 476dad75c..429d525ff 100644 --- a/services/usb-device-xous/src/main.rs +++ b/services/usb-device-xous/src/main.rs @@ -189,6 +189,7 @@ fn main() -> ! { let mut fido_rx_queue = VecDeque::<[u8; 64]>::new(); let mut lockstatus_force_update = true; // some state to track if we've been through a susupend/resume, to help out the status thread with its UX update after a restart-from-cold + #[cfg(any(target_os = "none", target_os = "xous"))] let mut was_suspend = true; loop { let mut msg = xous::receive_message(usbdev_sid).unwrap(); @@ -287,6 +288,7 @@ fn main() -> ! { Err(e) => log::trace!("U2F ERR: {:?}", e), } } + #[cfg(any(target_os = "none", target_os = "xous"))] if usb_dev.state() == UsbDeviceState::Suspend { log::info!("suspend detected"); if was_suspend == false {