Remote wakeup bug fixes

This commit is contained in:
alexmoon
2022-04-11 12:00:05 -04:00
parent 3a30b08936
commit 7fde3abd5d
2 changed files with 30 additions and 24 deletions

View File

@ -121,20 +121,20 @@ async fn main(_spawner: Spawner, p: Peripherals) {
if SUSPENDED.load(Ordering::Acquire) {
info!("Triggering remote wakeup");
USB_COMMANDS.send(DeviceCommand::RemoteWakeup);
USB_COMMANDS.send(DeviceCommand::RemoteWakeup).await;
} else {
let report = KeyboardReport {
keycodes: [4, 0, 0, 0, 0, 0],
leds: 0,
modifier: 0,
reserved: 0,
};
match hid_in.serialize(&report).await {
Ok(()) => {}
Err(e) => warn!("Failed to send report: {:?}", e),
};
}
let report = KeyboardReport {
keycodes: [4, 0, 0, 0, 0, 0],
leds: 0,
modifier: 0,
reserved: 0,
};
match hid_in.serialize(&report).await {
Ok(()) => {}
Err(e) => warn!("Failed to send report: {:?}", e),
};
button.wait_for_high().await;
info!("RELEASED");
let report = KeyboardReport {