aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf52840/src/bin/usb_hid_mouse.rs
diff options
context:
space:
mode:
authormatteo <email>2025-09-23 20:20:43 +0200
committermatteo <email>2025-09-23 20:20:43 +0200
commit2e303c995c53a97a1c2eaecf77827f02567b8417 (patch)
tree77ab31d8cf91590a384007936dd09f69e58a475d /examples/nrf52840/src/bin/usb_hid_mouse.rs
parentd72e8d9af921bfd5ddc25a17933e16b2132386b8 (diff)
update hid examples
Diffstat (limited to 'examples/nrf52840/src/bin/usb_hid_mouse.rs')
-rw-r--r--examples/nrf52840/src/bin/usb_hid_mouse.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/nrf52840/src/bin/usb_hid_mouse.rs b/examples/nrf52840/src/bin/usb_hid_mouse.rs
index 80cda70e3..b3d90354b 100644
--- a/examples/nrf52840/src/bin/usb_hid_mouse.rs
+++ b/examples/nrf52840/src/bin/usb_hid_mouse.rs
@@ -37,6 +37,10 @@ async fn main(_spawner: Spawner) {
37 config.serial_number = Some("12345678"); 37 config.serial_number = Some("12345678");
38 config.max_power = 100; 38 config.max_power = 100;
39 config.max_packet_size_0 = 64; 39 config.max_packet_size_0 = 64;
40 config.composite_with_iads = false;
41 config.device_class = 0;
42 config.device_sub_class = 0;
43 config.device_protocol = 0;
40 44
41 // Create embassy-usb DeviceBuilder using the driver and config. 45 // Create embassy-usb DeviceBuilder using the driver and config.
42 // It needs some buffers for building the descriptors. 46 // It needs some buffers for building the descriptors.
@@ -65,7 +69,7 @@ async fn main(_spawner: Spawner) {
65 max_packet_size: 8, 69 max_packet_size: 8,
66 }; 70 };
67 71
68 let mut writer = HidWriter::<_, 5>::new(&mut builder, &mut state, config); 72 let mut writer = HidWriter::<_, 5>::new_mouse(&mut builder, &mut state, config);
69 73
70 // Build the builder. 74 // Build the builder.
71 let mut usb = builder.build(); 75 let mut usb = builder.build();