aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/src')
-rw-r--r--examples/nrf/src/bin/usb_hid_keyboard.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/nrf/src/bin/usb_hid_keyboard.rs b/examples/nrf/src/bin/usb_hid_keyboard.rs
index 483d86b81..fb3a198a7 100644
--- a/examples/nrf/src/bin/usb_hid_keyboard.rs
+++ b/examples/nrf/src/bin/usb_hid_keyboard.rs
@@ -121,20 +121,20 @@ async fn main(_spawner: Spawner, p: Peripherals) {
121 121
122 if SUSPENDED.load(Ordering::Acquire) { 122 if SUSPENDED.load(Ordering::Acquire) {
123 info!("Triggering remote wakeup"); 123 info!("Triggering remote wakeup");
124 USB_COMMANDS.send(DeviceCommand::RemoteWakeup); 124 USB_COMMANDS.send(DeviceCommand::RemoteWakeup).await;
125 } else {
126 let report = KeyboardReport {
127 keycodes: [4, 0, 0, 0, 0, 0],
128 leds: 0,
129 modifier: 0,
130 reserved: 0,
131 };
132 match hid_in.serialize(&report).await {
133 Ok(()) => {}
134 Err(e) => warn!("Failed to send report: {:?}", e),
135 };
125 } 136 }
126 137
127 let report = KeyboardReport {
128 keycodes: [4, 0, 0, 0, 0, 0],
129 leds: 0,
130 modifier: 0,
131 reserved: 0,
132 };
133 match hid_in.serialize(&report).await {
134 Ok(()) => {}
135 Err(e) => warn!("Failed to send report: {:?}", e),
136 };
137
138 button.wait_for_high().await; 138 button.wait_for_high().await;
139 info!("RELEASED"); 139 info!("RELEASED");
140 let report = KeyboardReport { 140 let report = KeyboardReport {