diff options
| author | matteo <email> | 2025-09-23 20:20:43 +0200 |
|---|---|---|
| committer | matteo <email> | 2025-09-23 20:20:43 +0200 |
| commit | 2e303c995c53a97a1c2eaecf77827f02567b8417 (patch) | |
| tree | 77ab31d8cf91590a384007936dd09f69e58a475d /examples/rp/src/bin/usb_hid_mouse.rs | |
| parent | d72e8d9af921bfd5ddc25a17933e16b2132386b8 (diff) | |
update hid examples
Diffstat (limited to 'examples/rp/src/bin/usb_hid_mouse.rs')
| -rwxr-xr-x | examples/rp/src/bin/usb_hid_mouse.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/rp/src/bin/usb_hid_mouse.rs b/examples/rp/src/bin/usb_hid_mouse.rs index 4454c593c..4d8fc354e 100755 --- a/examples/rp/src/bin/usb_hid_mouse.rs +++ b/examples/rp/src/bin/usb_hid_mouse.rs | |||
| @@ -35,6 +35,10 @@ async fn main(_spawner: Spawner) { | |||
| 35 | config.serial_number = Some("12345678"); | 35 | config.serial_number = Some("12345678"); |
| 36 | config.max_power = 100; | 36 | config.max_power = 100; |
| 37 | config.max_packet_size_0 = 64; | 37 | config.max_packet_size_0 = 64; |
| 38 | config.composite_with_iads = false; | ||
| 39 | config.device_class = 0; | ||
| 40 | config.device_sub_class = 0; | ||
| 41 | config.device_protocol = 0; | ||
| 38 | 42 | ||
| 39 | // Create embassy-usb DeviceBuilder using the driver and config. | 43 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 40 | // It needs some buffers for building the descriptors. | 44 | // It needs some buffers for building the descriptors. |
| @@ -66,7 +70,7 @@ async fn main(_spawner: Spawner) { | |||
| 66 | poll_ms: 60, | 70 | poll_ms: 60, |
| 67 | max_packet_size: 64, | 71 | max_packet_size: 64, |
| 68 | }; | 72 | }; |
| 69 | let hid = HidReaderWriter::<_, 1, 8>::new(&mut builder, &mut state, config); | 73 | let hid = HidReaderWriter::<_, 1, 8>::new_keyboard(&mut builder, &mut state, config); |
| 70 | 74 | ||
| 71 | // Build the builder. | 75 | // Build the builder. |
| 72 | let mut usb = builder.build(); | 76 | let mut usb = builder.build(); |
