diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-02-07 23:45:01 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-02-08 00:30:53 +0100 |
| commit | 86487db5d1773d2a764ab340051d70cfa40e4714 (patch) | |
| tree | d5051ead9e65ea0a51f315a4302c867d07cb2449 /examples | |
| parent | 3af991ab63d14cfad6f50d28bfb944d1895d1c70 (diff) | |
usb: use InterfaceNumber in msos.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf52840/src/bin/usb_serial_winusb.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/nrf52840/src/bin/usb_serial_winusb.rs b/examples/nrf52840/src/bin/usb_serial_winusb.rs index ade6af527..6561fc3b4 100644 --- a/examples/nrf52840/src/bin/usb_serial_winusb.rs +++ b/examples/nrf52840/src/bin/usb_serial_winusb.rs | |||
| @@ -12,6 +12,7 @@ use embassy_nrf::{interrupt, pac}; | |||
| 12 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; | 12 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; |
| 13 | use embassy_usb::driver::EndpointError; | 13 | use embassy_usb::driver::EndpointError; |
| 14 | use embassy_usb::msos::{self, windows_version}; | 14 | use embassy_usb::msos::{self, windows_version}; |
| 15 | use embassy_usb::types::InterfaceNumber; | ||
| 15 | use embassy_usb::{Builder, Config}; | 16 | use embassy_usb::{Builder, Config}; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 18 | ||
| @@ -77,7 +78,7 @@ async fn main(_spawner: Spawner) { | |||
| 77 | // Inside a class constructor, you would just need to call `FunctionBuilder::msos_feature` instead. | 78 | // Inside a class constructor, you would just need to call `FunctionBuilder::msos_feature` instead. |
| 78 | let msos_writer = builder.msos_writer(); | 79 | let msos_writer = builder.msos_writer(); |
| 79 | msos_writer.configuration(0); | 80 | msos_writer.configuration(0); |
| 80 | msos_writer.function(0); | 81 | msos_writer.function(InterfaceNumber(0)); |
| 81 | msos_writer.function_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 82 | msos_writer.function_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| 82 | msos_writer.function_feature(msos::RegistryPropertyFeatureDescriptor::new( | 83 | msos_writer.function_feature(msos::RegistryPropertyFeatureDescriptor::new( |
| 83 | "DeviceInterfaceGUIDs", | 84 | "DeviceInterfaceGUIDs", |
