diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-02-07 23:31:24 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-07 23:31:24 +0000 |
| commit | 9d637070a516a9ed24c3e12a20082ffdf54f72fb (patch) | |
| tree | d5051ead9e65ea0a51f315a4302c867d07cb2449 /examples | |
| parent | 4a224efe75c7986f5b3d8c5d6083fa17cb774f12 (diff) | |
| parent | 86487db5d1773d2a764ab340051d70cfa40e4714 (diff) | |
Merge #1203
1203: usb: unify ControlHandler+DeviceStateHandler, route all control requests to all handlers. r=Dirbaio a=Dirbaio
depends on #1202
- Allows classes to handle vendor requests. (fixes #1078)
- Allows classes to use a single handler for multiple interfaces.
- Allows classes to access the other events (previously only `reset` was available).
Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf52840/src/bin/usb_ethernet.rs | 1 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_hid_keyboard.rs | 25 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_hid_mouse.rs | 1 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_serial_multitask.rs | 1 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_serial_winusb.rs | 4 | ||||
| -rw-r--r-- | examples/rp/src/bin/usb_ethernet.rs | 1 | ||||
| -rw-r--r-- | examples/rp/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32f1/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32f3/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_ethernet.rs | 1 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32f7/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32l5/src/bin/usb_ethernet.rs | 1 | ||||
| -rw-r--r-- | examples/stm32l5/src/bin/usb_hid_mouse.rs | 1 | ||||
| -rw-r--r-- | examples/stm32l5/src/bin/usb_serial.rs | 1 | ||||
| -rw-r--r-- | examples/stm32u5/src/bin/usb_serial.rs | 1 |
19 files changed, 15 insertions, 31 deletions
diff --git a/examples/nrf52840/src/bin/usb_ethernet.rs b/examples/nrf52840/src/bin/usb_ethernet.rs index 699666cee..979780896 100644 --- a/examples/nrf52840/src/bin/usb_ethernet.rs +++ b/examples/nrf52840/src/bin/usb_ethernet.rs | |||
| @@ -82,7 +82,6 @@ async fn main(spawner: Spawner) { | |||
| 82 | &mut singleton!([0; 256])[..], | 82 | &mut singleton!([0; 256])[..], |
| 83 | &mut singleton!([0; 256])[..], | 83 | &mut singleton!([0; 256])[..], |
| 84 | &mut singleton!([0; 128])[..], | 84 | &mut singleton!([0; 128])[..], |
| 85 | None, | ||
| 86 | ); | 85 | ); |
| 87 | 86 | ||
| 88 | // Our MAC addr. | 87 | // Our MAC addr. |
diff --git a/examples/nrf52840/src/bin/usb_hid_keyboard.rs b/examples/nrf52840/src/bin/usb_hid_keyboard.rs index 017cac197..3d8a114cd 100644 --- a/examples/nrf52840/src/bin/usb_hid_keyboard.rs +++ b/examples/nrf52840/src/bin/usb_hid_keyboard.rs | |||
| @@ -16,7 +16,7 @@ use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | |||
| 16 | use embassy_sync::signal::Signal; | 16 | use embassy_sync::signal::Signal; |
| 17 | use embassy_usb::class::hid::{HidReaderWriter, ReportId, RequestHandler, State}; | 17 | use embassy_usb::class::hid::{HidReaderWriter, ReportId, RequestHandler, State}; |
| 18 | use embassy_usb::control::OutResponse; | 18 | use embassy_usb::control::OutResponse; |
| 19 | use embassy_usb::{Builder, Config, DeviceStateHandler}; | 19 | use embassy_usb::{Builder, Config, Handler}; |
| 20 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; | 20 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; |
| 21 | use {defmt_rtt as _, panic_probe as _}; | 21 | use {defmt_rtt as _, panic_probe as _}; |
| 22 | 22 | ||
| @@ -52,7 +52,7 @@ async fn main(_spawner: Spawner) { | |||
| 52 | let mut bos_descriptor = [0; 256]; | 52 | let mut bos_descriptor = [0; 256]; |
| 53 | let mut control_buf = [0; 64]; | 53 | let mut control_buf = [0; 64]; |
| 54 | let request_handler = MyRequestHandler {}; | 54 | let request_handler = MyRequestHandler {}; |
| 55 | let device_state_handler = MyDeviceStateHandler::new(); | 55 | let mut device_handler = MyDeviceHandler::new(); |
| 56 | 56 | ||
| 57 | let mut state = State::new(); | 57 | let mut state = State::new(); |
| 58 | 58 | ||
| @@ -63,9 +63,10 @@ async fn main(_spawner: Spawner) { | |||
| 63 | &mut config_descriptor, | 63 | &mut config_descriptor, |
| 64 | &mut bos_descriptor, | 64 | &mut bos_descriptor, |
| 65 | &mut control_buf, | 65 | &mut control_buf, |
| 66 | Some(&device_state_handler), | ||
| 67 | ); | 66 | ); |
| 68 | 67 | ||
| 68 | builder.handler(&mut device_handler); | ||
| 69 | |||
| 69 | // Create classes on the builder. | 70 | // Create classes on the builder. |
| 70 | let config = embassy_usb::class::hid::Config { | 71 | let config = embassy_usb::class::hid::Config { |
| 71 | report_descriptor: KeyboardReport::desc(), | 72 | report_descriptor: KeyboardReport::desc(), |
| @@ -164,20 +165,20 @@ impl RequestHandler for MyRequestHandler { | |||
| 164 | } | 165 | } |
| 165 | } | 166 | } |
| 166 | 167 | ||
| 167 | struct MyDeviceStateHandler { | 168 | struct MyDeviceHandler { |
| 168 | configured: AtomicBool, | 169 | configured: AtomicBool, |
| 169 | } | 170 | } |
| 170 | 171 | ||
| 171 | impl MyDeviceStateHandler { | 172 | impl MyDeviceHandler { |
| 172 | fn new() -> Self { | 173 | fn new() -> Self { |
| 173 | MyDeviceStateHandler { | 174 | MyDeviceHandler { |
| 174 | configured: AtomicBool::new(false), | 175 | configured: AtomicBool::new(false), |
| 175 | } | 176 | } |
| 176 | } | 177 | } |
| 177 | } | 178 | } |
| 178 | 179 | ||
| 179 | impl DeviceStateHandler for MyDeviceStateHandler { | 180 | impl Handler for MyDeviceHandler { |
| 180 | fn enabled(&self, enabled: bool) { | 181 | fn enabled(&mut self, enabled: bool) { |
| 181 | self.configured.store(false, Ordering::Relaxed); | 182 | self.configured.store(false, Ordering::Relaxed); |
| 182 | SUSPENDED.store(false, Ordering::Release); | 183 | SUSPENDED.store(false, Ordering::Release); |
| 183 | if enabled { | 184 | if enabled { |
| @@ -187,17 +188,17 @@ impl DeviceStateHandler for MyDeviceStateHandler { | |||
| 187 | } | 188 | } |
| 188 | } | 189 | } |
| 189 | 190 | ||
| 190 | fn reset(&self) { | 191 | fn reset(&mut self) { |
| 191 | self.configured.store(false, Ordering::Relaxed); | 192 | self.configured.store(false, Ordering::Relaxed); |
| 192 | info!("Bus reset, the Vbus current limit is 100mA"); | 193 | info!("Bus reset, the Vbus current limit is 100mA"); |
| 193 | } | 194 | } |
| 194 | 195 | ||
| 195 | fn addressed(&self, addr: u8) { | 196 | fn addressed(&mut self, addr: u8) { |
| 196 | self.configured.store(false, Ordering::Relaxed); | 197 | self.configured.store(false, Ordering::Relaxed); |
| 197 | info!("USB address set to: {}", addr); | 198 | info!("USB address set to: {}", addr); |
| 198 | } | 199 | } |
| 199 | 200 | ||
| 200 | fn configured(&self, configured: bool) { | 201 | fn configured(&mut self, configured: bool) { |
| 201 | self.configured.store(configured, Ordering::Relaxed); | 202 | self.configured.store(configured, Ordering::Relaxed); |
| 202 | if configured { | 203 | if configured { |
| 203 | info!("Device configured, it may now draw up to the configured current limit from Vbus.") | 204 | info!("Device configured, it may now draw up to the configured current limit from Vbus.") |
| @@ -206,7 +207,7 @@ impl DeviceStateHandler for MyDeviceStateHandler { | |||
| 206 | } | 207 | } |
| 207 | } | 208 | } |
| 208 | 209 | ||
| 209 | fn suspended(&self, suspended: bool) { | 210 | fn suspended(&mut self, suspended: bool) { |
| 210 | if suspended { | 211 | if suspended { |
| 211 | info!("Device suspended, the Vbus current limit is 500µA (or 2.5mA for high-power devices with remote wakeup enabled)."); | 212 | info!("Device suspended, the Vbus current limit is 500µA (or 2.5mA for high-power devices with remote wakeup enabled)."); |
| 212 | SUSPENDED.store(true, Ordering::Release); | 213 | SUSPENDED.store(true, Ordering::Release); |
diff --git a/examples/nrf52840/src/bin/usb_hid_mouse.rs b/examples/nrf52840/src/bin/usb_hid_mouse.rs index a5849129a..d7c9d55b7 100644 --- a/examples/nrf52840/src/bin/usb_hid_mouse.rs +++ b/examples/nrf52840/src/bin/usb_hid_mouse.rs | |||
| @@ -55,7 +55,6 @@ async fn main(_spawner: Spawner) { | |||
| 55 | &mut config_descriptor, | 55 | &mut config_descriptor, |
| 56 | &mut bos_descriptor, | 56 | &mut bos_descriptor, |
| 57 | &mut control_buf, | 57 | &mut control_buf, |
| 58 | None, | ||
| 59 | ); | 58 | ); |
| 60 | 59 | ||
| 61 | // Create classes on the builder. | 60 | // Create classes on the builder. |
diff --git a/examples/nrf52840/src/bin/usb_serial.rs b/examples/nrf52840/src/bin/usb_serial.rs index 18b6f25b9..102d7ea60 100644 --- a/examples/nrf52840/src/bin/usb_serial.rs +++ b/examples/nrf52840/src/bin/usb_serial.rs | |||
| @@ -59,7 +59,6 @@ async fn main(_spawner: Spawner) { | |||
| 59 | &mut config_descriptor, | 59 | &mut config_descriptor, |
| 60 | &mut bos_descriptor, | 60 | &mut bos_descriptor, |
| 61 | &mut control_buf, | 61 | &mut control_buf, |
| 62 | None, | ||
| 63 | ); | 62 | ); |
| 64 | 63 | ||
| 65 | // Create classes on the builder. | 64 | // Create classes on the builder. |
diff --git a/examples/nrf52840/src/bin/usb_serial_multitask.rs b/examples/nrf52840/src/bin/usb_serial_multitask.rs index 3532d3f82..558d4ba60 100644 --- a/examples/nrf52840/src/bin/usb_serial_multitask.rs +++ b/examples/nrf52840/src/bin/usb_serial_multitask.rs | |||
| @@ -83,7 +83,6 @@ async fn main(spawner: Spawner) { | |||
| 83 | &mut res.config_descriptor, | 83 | &mut res.config_descriptor, |
| 84 | &mut res.bos_descriptor, | 84 | &mut res.bos_descriptor, |
| 85 | &mut res.control_buf, | 85 | &mut res.control_buf, |
| 86 | None, | ||
| 87 | ); | 86 | ); |
| 88 | 87 | ||
| 89 | // Create classes on the builder. | 88 | // Create classes on the builder. |
diff --git a/examples/nrf52840/src/bin/usb_serial_winusb.rs b/examples/nrf52840/src/bin/usb_serial_winusb.rs index f4b828de6..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 | ||
| @@ -65,7 +66,6 @@ async fn main(_spawner: Spawner) { | |||
| 65 | &mut bos_descriptor, | 66 | &mut bos_descriptor, |
| 66 | &mut msos_descriptor, | 67 | &mut msos_descriptor, |
| 67 | &mut control_buf, | 68 | &mut control_buf, |
| 68 | None, | ||
| 69 | ); | 69 | ); |
| 70 | 70 | ||
| 71 | builder.msos_descriptor(windows_version::WIN8_1, 2); | 71 | builder.msos_descriptor(windows_version::WIN8_1, 2); |
| @@ -78,7 +78,7 @@ async fn main(_spawner: Spawner) { | |||
| 78 | // 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. |
| 79 | let msos_writer = builder.msos_writer(); | 79 | let msos_writer = builder.msos_writer(); |
| 80 | msos_writer.configuration(0); | 80 | msos_writer.configuration(0); |
| 81 | msos_writer.function(0); | 81 | msos_writer.function(InterfaceNumber(0)); |
| 82 | msos_writer.function_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 82 | msos_writer.function_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| 83 | msos_writer.function_feature(msos::RegistryPropertyFeatureDescriptor::new( | 83 | msos_writer.function_feature(msos::RegistryPropertyFeatureDescriptor::new( |
| 84 | "DeviceInterfaceGUIDs", | 84 | "DeviceInterfaceGUIDs", |
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs index 104b25d39..66a6ed4d0 100644 --- a/examples/rp/src/bin/usb_ethernet.rs +++ b/examples/rp/src/bin/usb_ethernet.rs | |||
| @@ -73,7 +73,6 @@ async fn main(spawner: Spawner) { | |||
| 73 | &mut singleton!([0; 256])[..], | 73 | &mut singleton!([0; 256])[..], |
| 74 | &mut singleton!([0; 256])[..], | 74 | &mut singleton!([0; 256])[..], |
| 75 | &mut singleton!([0; 128])[..], | 75 | &mut singleton!([0; 128])[..], |
| 76 | None, | ||
| 77 | ); | 76 | ); |
| 78 | 77 | ||
| 79 | // Our MAC addr. | 78 | // Our MAC addr. |
diff --git a/examples/rp/src/bin/usb_serial.rs b/examples/rp/src/bin/usb_serial.rs index b7d6493b4..a991082ee 100644 --- a/examples/rp/src/bin/usb_serial.rs +++ b/examples/rp/src/bin/usb_serial.rs | |||
| @@ -53,7 +53,6 @@ async fn main(_spawner: Spawner) { | |||
| 53 | &mut config_descriptor, | 53 | &mut config_descriptor, |
| 54 | &mut bos_descriptor, | 54 | &mut bos_descriptor, |
| 55 | &mut control_buf, | 55 | &mut control_buf, |
| 56 | None, | ||
| 57 | ); | 56 | ); |
| 58 | 57 | ||
| 59 | // Create classes on the builder. | 58 | // Create classes on the builder. |
diff --git a/examples/stm32f1/src/bin/usb_serial.rs b/examples/stm32f1/src/bin/usb_serial.rs index ad92cdeb2..07cad84ef 100644 --- a/examples/stm32f1/src/bin/usb_serial.rs +++ b/examples/stm32f1/src/bin/usb_serial.rs | |||
| @@ -58,7 +58,6 @@ async fn main(_spawner: Spawner) { | |||
| 58 | &mut config_descriptor, | 58 | &mut config_descriptor, |
| 59 | &mut bos_descriptor, | 59 | &mut bos_descriptor, |
| 60 | &mut control_buf, | 60 | &mut control_buf, |
| 61 | None, | ||
| 62 | ); | 61 | ); |
| 63 | 62 | ||
| 64 | // Create classes on the builder. | 63 | // Create classes on the builder. |
diff --git a/examples/stm32f3/src/bin/usb_serial.rs b/examples/stm32f3/src/bin/usb_serial.rs index f6d27c860..5b4e0a91a 100644 --- a/examples/stm32f3/src/bin/usb_serial.rs +++ b/examples/stm32f3/src/bin/usb_serial.rs | |||
| @@ -55,7 +55,6 @@ async fn main(_spawner: Spawner) { | |||
| 55 | &mut config_descriptor, | 55 | &mut config_descriptor, |
| 56 | &mut bos_descriptor, | 56 | &mut bos_descriptor, |
| 57 | &mut control_buf, | 57 | &mut control_buf, |
| 58 | None, | ||
| 59 | ); | 58 | ); |
| 60 | 59 | ||
| 61 | // Create classes on the builder. | 60 | // Create classes on the builder. |
diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs index cf2885ae5..4a16aac07 100644 --- a/examples/stm32f4/src/bin/usb_ethernet.rs +++ b/examples/stm32f4/src/bin/usb_ethernet.rs | |||
| @@ -82,7 +82,6 @@ async fn main(spawner: Spawner) { | |||
| 82 | &mut singleton!([0; 256])[..], | 82 | &mut singleton!([0; 256])[..], |
| 83 | &mut singleton!([0; 256])[..], | 83 | &mut singleton!([0; 256])[..], |
| 84 | &mut singleton!([0; 128])[..], | 84 | &mut singleton!([0; 128])[..], |
| 85 | None, | ||
| 86 | ); | 85 | ); |
| 87 | 86 | ||
| 88 | // Our MAC addr. | 87 | // Our MAC addr. |
diff --git a/examples/stm32f4/src/bin/usb_serial.rs b/examples/stm32f4/src/bin/usb_serial.rs index 014647762..baabc1a2d 100644 --- a/examples/stm32f4/src/bin/usb_serial.rs +++ b/examples/stm32f4/src/bin/usb_serial.rs | |||
| @@ -57,7 +57,6 @@ async fn main(_spawner: Spawner) { | |||
| 57 | &mut config_descriptor, | 57 | &mut config_descriptor, |
| 58 | &mut bos_descriptor, | 58 | &mut bos_descriptor, |
| 59 | &mut control_buf, | 59 | &mut control_buf, |
| 60 | None, | ||
| 61 | ); | 60 | ); |
| 62 | 61 | ||
| 63 | // Create classes on the builder. | 62 | // Create classes on the builder. |
diff --git a/examples/stm32f7/src/bin/usb_serial.rs b/examples/stm32f7/src/bin/usb_serial.rs index 688bd0dab..5fd9d2ec9 100644 --- a/examples/stm32f7/src/bin/usb_serial.rs +++ b/examples/stm32f7/src/bin/usb_serial.rs | |||
| @@ -58,7 +58,6 @@ async fn main(_spawner: Spawner) { | |||
| 58 | &mut config_descriptor, | 58 | &mut config_descriptor, |
| 59 | &mut bos_descriptor, | 59 | &mut bos_descriptor, |
| 60 | &mut control_buf, | 60 | &mut control_buf, |
| 61 | None, | ||
| 62 | ); | 61 | ); |
| 63 | 62 | ||
| 64 | // Create classes on the builder. | 63 | // Create classes on the builder. |
diff --git a/examples/stm32h7/src/bin/usb_serial.rs b/examples/stm32h7/src/bin/usb_serial.rs index b319d12c3..9ef520ae2 100644 --- a/examples/stm32h7/src/bin/usb_serial.rs +++ b/examples/stm32h7/src/bin/usb_serial.rs | |||
| @@ -57,7 +57,6 @@ async fn main(_spawner: Spawner) { | |||
| 57 | &mut config_descriptor, | 57 | &mut config_descriptor, |
| 58 | &mut bos_descriptor, | 58 | &mut bos_descriptor, |
| 59 | &mut control_buf, | 59 | &mut control_buf, |
| 60 | None, | ||
| 61 | ); | 60 | ); |
| 62 | 61 | ||
| 63 | // Create classes on the builder. | 62 | // Create classes on the builder. |
diff --git a/examples/stm32l4/src/bin/usb_serial.rs b/examples/stm32l4/src/bin/usb_serial.rs index 3e38b10a3..663f60d52 100644 --- a/examples/stm32l4/src/bin/usb_serial.rs +++ b/examples/stm32l4/src/bin/usb_serial.rs | |||
| @@ -59,7 +59,6 @@ async fn main(_spawner: Spawner) { | |||
| 59 | &mut config_descriptor, | 59 | &mut config_descriptor, |
| 60 | &mut bos_descriptor, | 60 | &mut bos_descriptor, |
| 61 | &mut control_buf, | 61 | &mut control_buf, |
| 62 | None, | ||
| 63 | ); | 62 | ); |
| 64 | 63 | ||
| 65 | // Create classes on the builder. | 64 | // Create classes on the builder. |
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index e5a46b064..98ec0e836 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -79,7 +79,6 @@ async fn main(spawner: Spawner) { | |||
| 79 | &mut singleton!([0; 256])[..], | 79 | &mut singleton!([0; 256])[..], |
| 80 | &mut singleton!([0; 256])[..], | 80 | &mut singleton!([0; 256])[..], |
| 81 | &mut singleton!([0; 128])[..], | 81 | &mut singleton!([0; 128])[..], |
| 82 | None, | ||
| 83 | ); | 82 | ); |
| 84 | 83 | ||
| 85 | // Our MAC addr. | 84 | // Our MAC addr. |
diff --git a/examples/stm32l5/src/bin/usb_hid_mouse.rs b/examples/stm32l5/src/bin/usb_hid_mouse.rs index d38ed7496..e3bbe9d09 100644 --- a/examples/stm32l5/src/bin/usb_hid_mouse.rs +++ b/examples/stm32l5/src/bin/usb_hid_mouse.rs | |||
| @@ -51,7 +51,6 @@ async fn main(_spawner: Spawner) { | |||
| 51 | &mut config_descriptor, | 51 | &mut config_descriptor, |
| 52 | &mut bos_descriptor, | 52 | &mut bos_descriptor, |
| 53 | &mut control_buf, | 53 | &mut control_buf, |
| 54 | None, | ||
| 55 | ); | 54 | ); |
| 56 | 55 | ||
| 57 | // Create classes on the builder. | 56 | // Create classes on the builder. |
diff --git a/examples/stm32l5/src/bin/usb_serial.rs b/examples/stm32l5/src/bin/usb_serial.rs index 7562a4e96..66ccacb73 100644 --- a/examples/stm32l5/src/bin/usb_serial.rs +++ b/examples/stm32l5/src/bin/usb_serial.rs | |||
| @@ -46,7 +46,6 @@ async fn main(_spawner: Spawner) { | |||
| 46 | &mut config_descriptor, | 46 | &mut config_descriptor, |
| 47 | &mut bos_descriptor, | 47 | &mut bos_descriptor, |
| 48 | &mut control_buf, | 48 | &mut control_buf, |
| 49 | None, | ||
| 50 | ); | 49 | ); |
| 51 | 50 | ||
| 52 | // Create classes on the builder. | 51 | // Create classes on the builder. |
diff --git a/examples/stm32u5/src/bin/usb_serial.rs b/examples/stm32u5/src/bin/usb_serial.rs index c846836b0..8cd3bf2f4 100644 --- a/examples/stm32u5/src/bin/usb_serial.rs +++ b/examples/stm32u5/src/bin/usb_serial.rs | |||
| @@ -59,7 +59,6 @@ async fn main(_spawner: Spawner) { | |||
| 59 | &mut config_descriptor, | 59 | &mut config_descriptor, |
| 60 | &mut bos_descriptor, | 60 | &mut bos_descriptor, |
| 61 | &mut control_buf, | 61 | &mut control_buf, |
| 62 | None, | ||
| 63 | ); | 62 | ); |
| 64 | 63 | ||
| 65 | // Create classes on the builder. | 64 | // Create classes on the builder. |
