aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-11-08 23:08:50 +0100
committerDario Nieuwenhuis <[email protected]>2023-11-08 23:21:52 +0100
commit0b015bd727547d1eade5cd12c8b6a1b77483e6db (patch)
tree77f8a52f5a7eb5a8cc5981eae16e9871614015c7
parent79acb560ecb9089e31efdea29c6046225971fee3 (diff)
usb: remove msos-descriptor feature.
-rw-r--r--embassy-usb-logger/Cargo.toml3
-rw-r--r--embassy-usb-logger/src/lib.rs3
-rw-r--r--embassy-usb/Cargo.toml1
-rw-r--r--embassy-usb/src/builder.rs18
-rw-r--r--embassy-usb/src/lib.rs23
-rw-r--r--embassy-usb/src/msos.rs2
-rw-r--r--examples/nrf52840/Cargo.toml2
-rw-r--r--examples/rp/Cargo.toml4
-rw-r--r--examples/rp/src/bin/pio_uart.rs2
-rw-r--r--examples/rp/src/bin/usb_ethernet.rs2
-rw-r--r--examples/rp/src/bin/usb_midi.rs2
-rw-r--r--examples/rp/src/bin/usb_serial.rs2
-rw-r--r--examples/stm32f1/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32f3/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32f4/Cargo.toml2
-rw-r--r--examples/stm32f4/src/bin/usb_ethernet.rs2
-rw-r--r--examples/stm32f4/src/bin/usb_serial.rs2
-rw-r--r--examples/stm32f7/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32g4/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32h5/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32h7/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32l4/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32l5/src/bin/usb_ethernet.rs1
-rw-r--r--examples/stm32l5/src/bin/usb_hid_mouse.rs1
-rw-r--r--examples/stm32l5/src/bin/usb_serial.rs1
-rw-r--r--examples/stm32u5/src/bin/usb_serial.rs1
26 files changed, 29 insertions, 52 deletions
diff --git a/embassy-usb-logger/Cargo.toml b/embassy-usb-logger/Cargo.toml
index 02d0ed8e5..48b8bbcc6 100644
--- a/embassy-usb-logger/Cargo.toml
+++ b/embassy-usb-logger/Cargo.toml
@@ -8,9 +8,6 @@ src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-logger-v$VERS
8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-logger/src/" 8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-logger/src/"
9target = "thumbv7em-none-eabi" 9target = "thumbv7em-none-eabi"
10 10
11[features]
12msos-descriptor = ["embassy-usb/msos-descriptor"]
13
14[dependencies] 11[dependencies]
15embassy-usb = { version = "0.1.0", path = "../embassy-usb" } 12embassy-usb = { version = "0.1.0", path = "../embassy-usb" }
16embassy-sync = { version = "0.4.0", path = "../embassy-sync" } 13embassy-sync = { version = "0.4.0", path = "../embassy-sync" }
diff --git a/embassy-usb-logger/src/lib.rs b/embassy-usb-logger/src/lib.rs
index 95fc0a7ed..45d780bf8 100644
--- a/embassy-usb-logger/src/lib.rs
+++ b/embassy-usb-logger/src/lib.rs
@@ -19,7 +19,6 @@ pub struct LoggerState<'d> {
19 device_descriptor: [u8; 32], 19 device_descriptor: [u8; 32],
20 config_descriptor: [u8; 128], 20 config_descriptor: [u8; 128],
21 bos_descriptor: [u8; 16], 21 bos_descriptor: [u8; 16],
22 #[cfg(feature = "msos-descriptor")]
23 msos_descriptor: [u8; 256], 22 msos_descriptor: [u8; 256],
24 control_buf: [u8; 64], 23 control_buf: [u8; 64],
25} 24}
@@ -32,7 +31,6 @@ impl<'d> LoggerState<'d> {
32 device_descriptor: [0; 32], 31 device_descriptor: [0; 32],
33 config_descriptor: [0; 128], 32 config_descriptor: [0; 128],
34 bos_descriptor: [0; 16], 33 bos_descriptor: [0; 16],
35 #[cfg(feature = "msos-descriptor")]
36 msos_descriptor: [0; 256], 34 msos_descriptor: [0; 256],
37 control_buf: [0; 64], 35 control_buf: [0; 64],
38 } 36 }
@@ -77,7 +75,6 @@ impl<const N: usize> UsbLogger<N> {
77 &mut state.device_descriptor, 75 &mut state.device_descriptor,
78 &mut state.config_descriptor, 76 &mut state.config_descriptor,
79 &mut state.bos_descriptor, 77 &mut state.bos_descriptor,
80 #[cfg(feature = "msos-descriptor")]
81 &mut state.msos_descriptor, 78 &mut state.msos_descriptor,
82 &mut state.control_buf, 79 &mut state.control_buf,
83 ); 80 );
diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml
index d820a2d0b..5f64b7212 100644
--- a/embassy-usb/Cargo.toml
+++ b/embassy-usb/Cargo.toml
@@ -13,7 +13,6 @@ target = "thumbv7em-none-eabi"
13[features] 13[features]
14defmt = ["dep:defmt", "embassy-usb-driver/defmt"] 14defmt = ["dep:defmt", "embassy-usb-driver/defmt"]
15usbd-hid = ["dep:usbd-hid", "dep:ssmarshal"] 15usbd-hid = ["dep:usbd-hid", "dep:ssmarshal"]
16msos-descriptor = []
17default = ["usbd-hid"] 16default = ["usbd-hid"]
18 17
19# BEGIN AUTOGENERATED CONFIG FEATURES 18# BEGIN AUTOGENERATED CONFIG FEATURES
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs
index b4ddccd71..c4705d041 100644
--- a/embassy-usb/src/builder.rs
+++ b/embassy-usb/src/builder.rs
@@ -3,7 +3,6 @@ use heapless::Vec;
3use crate::config::MAX_HANDLER_COUNT; 3use crate::config::MAX_HANDLER_COUNT;
4use crate::descriptor::{BosWriter, DescriptorWriter}; 4use crate::descriptor::{BosWriter, DescriptorWriter};
5use crate::driver::{Driver, Endpoint, EndpointType}; 5use crate::driver::{Driver, Endpoint, EndpointType};
6#[cfg(feature = "msos-descriptor")]
7use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter}; 6use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter};
8use crate::types::{InterfaceNumber, StringIndex}; 7use crate::types::{InterfaceNumber, StringIndex};
9use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START}; 8use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START};
@@ -133,7 +132,6 @@ pub struct Builder<'d, D: Driver<'d>> {
133 config_descriptor: DescriptorWriter<'d>, 132 config_descriptor: DescriptorWriter<'d>,
134 bos_descriptor: BosWriter<'d>, 133 bos_descriptor: BosWriter<'d>,
135 134
136 #[cfg(feature = "msos-descriptor")]
137 msos_descriptor: MsOsDescriptorWriter<'d>, 135 msos_descriptor: MsOsDescriptorWriter<'d>,
138} 136}
139 137
@@ -149,7 +147,7 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
149 device_descriptor_buf: &'d mut [u8], 147 device_descriptor_buf: &'d mut [u8],
150 config_descriptor_buf: &'d mut [u8], 148 config_descriptor_buf: &'d mut [u8],
151 bos_descriptor_buf: &'d mut [u8], 149 bos_descriptor_buf: &'d mut [u8],
152 #[cfg(feature = "msos-descriptor")] msos_descriptor_buf: &'d mut [u8], 150 msos_descriptor_buf: &'d mut [u8],
153 control_buf: &'d mut [u8], 151 control_buf: &'d mut [u8],
154 ) -> Self { 152 ) -> Self {
155 // Magic values specified in USB-IF ECN on IADs. 153 // Magic values specified in USB-IF ECN on IADs.
@@ -189,14 +187,12 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
189 config_descriptor, 187 config_descriptor,
190 bos_descriptor, 188 bos_descriptor,
191 189
192 #[cfg(feature = "msos-descriptor")]
193 msos_descriptor: MsOsDescriptorWriter::new(msos_descriptor_buf), 190 msos_descriptor: MsOsDescriptorWriter::new(msos_descriptor_buf),
194 } 191 }
195 } 192 }
196 193
197 /// Creates the [`UsbDevice`] instance with the configuration in this builder. 194 /// Creates the [`UsbDevice`] instance with the configuration in this builder.
198 pub fn build(mut self) -> UsbDevice<'d, D> { 195 pub fn build(mut self) -> UsbDevice<'d, D> {
199 #[cfg(feature = "msos-descriptor")]
200 let msos_descriptor = self.msos_descriptor.build(&mut self.bos_descriptor); 196 let msos_descriptor = self.msos_descriptor.build(&mut self.bos_descriptor);
201 197
202 self.config_descriptor.end_configuration(); 198 self.config_descriptor.end_configuration();
@@ -206,7 +202,6 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
206 info!("USB: device_descriptor used: {}", self.device_descriptor.position()); 202 info!("USB: device_descriptor used: {}", self.device_descriptor.position());
207 info!("USB: config_descriptor used: {}", self.config_descriptor.position()); 203 info!("USB: config_descriptor used: {}", self.config_descriptor.position());
208 info!("USB: bos_descriptor used: {}", self.bos_descriptor.writer.position()); 204 info!("USB: bos_descriptor used: {}", self.bos_descriptor.writer.position());
209 #[cfg(feature = "msos-descriptor")]
210 info!("USB: msos_descriptor used: {}", msos_descriptor.len()); 205 info!("USB: msos_descriptor used: {}", msos_descriptor.len());
211 info!("USB: control_buf size: {}", self.control_buf.len()); 206 info!("USB: control_buf size: {}", self.control_buf.len());
212 207
@@ -217,10 +212,9 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
217 self.device_descriptor.into_buf(), 212 self.device_descriptor.into_buf(),
218 self.config_descriptor.into_buf(), 213 self.config_descriptor.into_buf(),
219 self.bos_descriptor.writer.into_buf(), 214 self.bos_descriptor.writer.into_buf(),
215 msos_descriptor,
220 self.interfaces, 216 self.interfaces,
221 self.control_buf, 217 self.control_buf,
222 #[cfg(feature = "msos-descriptor")]
223 msos_descriptor,
224 ) 218 )
225 } 219 }
226 220
@@ -251,7 +245,6 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
251 builder: self, 245 builder: self,
252 iface_count_index, 246 iface_count_index,
253 247
254 #[cfg(feature = "msos-descriptor")]
255 first_interface, 248 first_interface,
256 } 249 }
257 } 250 }
@@ -275,7 +268,6 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
275 StringIndex::new(index) 268 StringIndex::new(index)
276 } 269 }
277 270
278 #[cfg(feature = "msos-descriptor")]
279 /// Add an MS OS 2.0 Descriptor Set. 271 /// Add an MS OS 2.0 Descriptor Set.
280 /// 272 ///
281 /// Panics if called more than once. 273 /// Panics if called more than once.
@@ -283,13 +275,11 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
283 self.msos_descriptor.header(windows_version, vendor_code); 275 self.msos_descriptor.header(windows_version, vendor_code);
284 } 276 }
285 277
286 #[cfg(feature = "msos-descriptor")]
287 /// Add an MS OS 2.0 Device Level Feature Descriptor. 278 /// Add an MS OS 2.0 Device Level Feature Descriptor.
288 pub fn msos_feature<T: DeviceLevelDescriptor>(&mut self, desc: T) { 279 pub fn msos_feature<T: DeviceLevelDescriptor>(&mut self, desc: T) {
289 self.msos_descriptor.device_feature(desc); 280 self.msos_descriptor.device_feature(desc);
290 } 281 }
291 282
292 #[cfg(feature = "msos-descriptor")]
293 /// Gets the underlying [`MsOsDescriptorWriter`] to allow adding subsets and features for classes that 283 /// Gets the underlying [`MsOsDescriptorWriter`] to allow adding subsets and features for classes that
294 /// do not add their own. 284 /// do not add their own.
295 pub fn msos_writer(&mut self) -> &mut MsOsDescriptorWriter<'d> { 285 pub fn msos_writer(&mut self) -> &mut MsOsDescriptorWriter<'d> {
@@ -306,13 +296,11 @@ pub struct FunctionBuilder<'a, 'd, D: Driver<'d>> {
306 builder: &'a mut Builder<'d, D>, 296 builder: &'a mut Builder<'d, D>,
307 iface_count_index: Option<usize>, 297 iface_count_index: Option<usize>,
308 298
309 #[cfg(feature = "msos-descriptor")]
310 first_interface: InterfaceNumber, 299 first_interface: InterfaceNumber,
311} 300}
312 301
313impl<'a, 'd, D: Driver<'d>> Drop for FunctionBuilder<'a, 'd, D> { 302impl<'a, 'd, D: Driver<'d>> Drop for FunctionBuilder<'a, 'd, D> {
314 fn drop(&mut self) { 303 fn drop(&mut self) {
315 #[cfg(feature = "msos-descriptor")]
316 self.builder.msos_descriptor.end_function(); 304 self.builder.msos_descriptor.end_function();
317 } 305 }
318} 306}
@@ -344,7 +332,6 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> {
344 } 332 }
345 } 333 }
346 334
347 #[cfg(feature = "msos-descriptor")]
348 /// Add an MS OS 2.0 Function Level Feature Descriptor. 335 /// Add an MS OS 2.0 Function Level Feature Descriptor.
349 pub fn msos_feature<T: FunctionLevelDescriptor>(&mut self, desc: T) { 336 pub fn msos_feature<T: FunctionLevelDescriptor>(&mut self, desc: T) {
350 if !self.builder.msos_descriptor.is_in_config_subset() { 337 if !self.builder.msos_descriptor.is_in_config_subset() {
@@ -355,7 +342,6 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> {
355 self.builder.msos_descriptor.function(self.first_interface); 342 self.builder.msos_descriptor.function(self.first_interface);
356 } 343 }
357 344
358 #[cfg(feature = "msos-descriptor")]
359 self.builder.msos_descriptor.function_feature(desc); 345 self.builder.msos_descriptor.function_feature(desc);
360 } 346 }
361} 347}
diff --git a/embassy-usb/src/lib.rs b/embassy-usb/src/lib.rs
index 9fc1e3320..241e33a78 100644
--- a/embassy-usb/src/lib.rs
+++ b/embassy-usb/src/lib.rs
@@ -175,10 +175,7 @@ pub struct UsbBufferReport {
175 /// Number of bos descriptor bytes used 175 /// Number of bos descriptor bytes used
176 pub bos_descriptor_used: usize, 176 pub bos_descriptor_used: usize,
177 /// Number of msos descriptor bytes used 177 /// Number of msos descriptor bytes used
178 /// 178 pub msos_descriptor_used: usize,
179 /// Will be `None` if the "msos-descriptor" feature is not active.
180 /// Otherwise will return Some(bytes).
181 pub msos_descriptor_used: Option<usize>,
182 /// Size of the control buffer 179 /// Size of the control buffer
183 pub control_buffer_size: usize, 180 pub control_buffer_size: usize,
184} 181}
@@ -197,6 +194,7 @@ struct Inner<'d, D: Driver<'d>> {
197 device_descriptor: &'d [u8], 194 device_descriptor: &'d [u8],
198 config_descriptor: &'d [u8], 195 config_descriptor: &'d [u8],
199 bos_descriptor: &'d [u8], 196 bos_descriptor: &'d [u8],
197 msos_descriptor: crate::msos::MsOsDescriptorSet<'d>,
200 198
201 device_state: UsbDeviceState, 199 device_state: UsbDeviceState,
202 suspended: bool, 200 suspended: bool,
@@ -212,9 +210,6 @@ struct Inner<'d, D: Driver<'d>> {
212 210
213 interfaces: Vec<Interface, MAX_INTERFACE_COUNT>, 211 interfaces: Vec<Interface, MAX_INTERFACE_COUNT>,
214 handlers: Vec<&'d mut dyn Handler, MAX_HANDLER_COUNT>, 212 handlers: Vec<&'d mut dyn Handler, MAX_HANDLER_COUNT>,
215
216 #[cfg(feature = "msos-descriptor")]
217 msos_descriptor: crate::msos::MsOsDescriptorSet<'d>,
218} 213}
219 214
220impl<'d, D: Driver<'d>> UsbDevice<'d, D> { 215impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
@@ -225,9 +220,9 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
225 device_descriptor: &'d [u8], 220 device_descriptor: &'d [u8],
226 config_descriptor: &'d [u8], 221 config_descriptor: &'d [u8],
227 bos_descriptor: &'d [u8], 222 bos_descriptor: &'d [u8],
223 msos_descriptor: crate::msos::MsOsDescriptorSet<'d>,
228 interfaces: Vec<Interface, MAX_INTERFACE_COUNT>, 224 interfaces: Vec<Interface, MAX_INTERFACE_COUNT>,
229 control_buf: &'d mut [u8], 225 control_buf: &'d mut [u8],
230 #[cfg(feature = "msos-descriptor")] msos_descriptor: crate::msos::MsOsDescriptorSet<'d>,
231 ) -> UsbDevice<'d, D> { 226 ) -> UsbDevice<'d, D> {
232 // Start the USB bus. 227 // Start the USB bus.
233 // This prevent further allocation by consuming the driver. 228 // This prevent further allocation by consuming the driver.
@@ -242,6 +237,7 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
242 device_descriptor, 237 device_descriptor,
243 config_descriptor, 238 config_descriptor,
244 bos_descriptor, 239 bos_descriptor,
240 msos_descriptor,
245 241
246 device_state: UsbDeviceState::Unpowered, 242 device_state: UsbDeviceState::Unpowered,
247 suspended: false, 243 suspended: false,
@@ -251,8 +247,6 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
251 set_address_pending: false, 247 set_address_pending: false,
252 interfaces, 248 interfaces,
253 handlers, 249 handlers,
254 #[cfg(feature = "msos-descriptor")]
255 msos_descriptor,
256 }, 250 },
257 } 251 }
258 } 252 }
@@ -261,16 +255,11 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
261 /// 255 ///
262 /// Useful for tuning buffer sizes for actual usage 256 /// Useful for tuning buffer sizes for actual usage
263 pub fn buffer_usage(&self) -> UsbBufferReport { 257 pub fn buffer_usage(&self) -> UsbBufferReport {
264 #[cfg(not(feature = "msos-descriptor"))]
265 let mdu = None;
266 #[cfg(feature = "msos-descriptor")]
267 let mdu = Some(self.inner.msos_descriptor.len());
268
269 UsbBufferReport { 258 UsbBufferReport {
270 device_descriptor_used: self.inner.device_descriptor.len(), 259 device_descriptor_used: self.inner.device_descriptor.len(),
271 config_descriptor_used: self.inner.config_descriptor.len(), 260 config_descriptor_used: self.inner.config_descriptor.len(),
272 bos_descriptor_used: self.inner.bos_descriptor.len(), 261 bos_descriptor_used: self.inner.bos_descriptor.len(),
273 msos_descriptor_used: mdu, 262 msos_descriptor_used: self.inner.msos_descriptor.len(),
274 control_buffer_size: self.control_buf.len(), 263 control_buffer_size: self.control_buf.len(),
275 } 264 }
276 } 265 }
@@ -684,7 +673,7 @@ impl<'d, D: Driver<'d>> Inner<'d, D> {
684 } 673 }
685 _ => InResponse::Rejected, 674 _ => InResponse::Rejected,
686 }, 675 },
687 #[cfg(feature = "msos-descriptor")] 676
688 (RequestType::Vendor, Recipient::Device) => { 677 (RequestType::Vendor, Recipient::Device) => {
689 if !self.msos_descriptor.is_empty() 678 if !self.msos_descriptor.is_empty()
690 && req.request == self.msos_descriptor.vendor_code() 679 && req.request == self.msos_descriptor.vendor_code()
diff --git a/embassy-usb/src/msos.rs b/embassy-usb/src/msos.rs
index 13d5d7c4b..3858c0f51 100644
--- a/embassy-usb/src/msos.rs
+++ b/embassy-usb/src/msos.rs
@@ -1,5 +1,3 @@
1#![cfg(feature = "msos-descriptor")]
2
3//! Microsoft OS Descriptors 1//! Microsoft OS Descriptors
4//! 2//!
5//! <https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-os-2-0-descriptors-specification> 3//! <https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-os-2-0-descriptors-specification>
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml
index f803adb03..7bf904ee0 100644
--- a/examples/nrf52840/Cargo.toml
+++ b/examples/nrf52840/Cargo.toml
@@ -34,7 +34,7 @@ embassy-executor = { version = "0.3.1", path = "../../embassy-executor", feature
34embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } 34embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
35embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } 35embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
36embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } 36embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true }
37embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true } 37embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"], optional = true }
38embedded-io = { version = "0.6.0", features = ["defmt-03"] } 38embedded-io = { version = "0.6.0", features = ["defmt-03"] }
39embedded-io-async = { version = "0.6.0", optional = true, features = ["defmt-03"] } 39embedded-io-async = { version = "0.6.0", optional = true, features = ["defmt-03"] }
40embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true } 40embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true }
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml
index 5ff505e86..fbe7acae1 100644
--- a/examples/rp/Cargo.toml
+++ b/examples/rp/Cargo.toml
@@ -11,11 +11,11 @@ embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["de
11embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] } 12embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] }
13embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } 13embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] }
14embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor"] } 14embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
15embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } 15embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] }
16embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } 16embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
17embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } 17embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
18embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger", features = ["msos-descriptor"]} 18embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger" }
19embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"] } 19embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"] }
20lora-phy = { version = "2" } 20lora-phy = { version = "2" }
21lorawan-device = { version = "0.11.0", default-features = false, features = ["async", "external-lora-phy"] } 21lorawan-device = { version = "0.11.0", default-features = false, features = ["async", "external-lora-phy"] }
diff --git a/examples/rp/src/bin/pio_uart.rs b/examples/rp/src/bin/pio_uart.rs
index dca28d779..fb9d423ec 100644
--- a/examples/rp/src/bin/pio_uart.rs
+++ b/examples/rp/src/bin/pio_uart.rs
@@ -75,7 +75,7 @@ async fn main(_spawner: Spawner) {
75 &mut device_descriptor, 75 &mut device_descriptor,
76 &mut config_descriptor, 76 &mut config_descriptor,
77 &mut bos_descriptor, 77 &mut bos_descriptor,
78 &mut [], 78 &mut [], // no msos descriptors
79 &mut control_buf, 79 &mut control_buf,
80 ); 80 );
81 81
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs
index aea9e6481..cc63029fb 100644
--- a/examples/rp/src/bin/usb_ethernet.rs
+++ b/examples/rp/src/bin/usb_ethernet.rs
@@ -71,7 +71,7 @@ async fn main(spawner: Spawner) {
71 &mut make_static!([0; 256])[..], 71 &mut make_static!([0; 256])[..],
72 &mut make_static!([0; 256])[..], 72 &mut make_static!([0; 256])[..],
73 &mut make_static!([0; 256])[..], 73 &mut make_static!([0; 256])[..],
74 &mut make_static!([0; 0])[..], 74 &mut [], // no msos descriptors
75 &mut make_static!([0; 128])[..], 75 &mut make_static!([0; 128])[..],
76 ); 76 );
77 77
diff --git a/examples/rp/src/bin/usb_midi.rs b/examples/rp/src/bin/usb_midi.rs
index 3ba34c806..d5cdae319 100644
--- a/examples/rp/src/bin/usb_midi.rs
+++ b/examples/rp/src/bin/usb_midi.rs
@@ -58,7 +58,7 @@ async fn main(_spawner: Spawner) {
58 &mut device_descriptor, 58 &mut device_descriptor,
59 &mut config_descriptor, 59 &mut config_descriptor,
60 &mut bos_descriptor, 60 &mut bos_descriptor,
61 &mut [], 61 &mut [], // no msos descriptors
62 &mut control_buf, 62 &mut control_buf,
63 ); 63 );
64 64
diff --git a/examples/rp/src/bin/usb_serial.rs b/examples/rp/src/bin/usb_serial.rs
index 0d0317cda..30347d920 100644
--- a/examples/rp/src/bin/usb_serial.rs
+++ b/examples/rp/src/bin/usb_serial.rs
@@ -60,7 +60,7 @@ async fn main(_spawner: Spawner) {
60 &mut device_descriptor, 60 &mut device_descriptor,
61 &mut config_descriptor, 61 &mut config_descriptor,
62 &mut bos_descriptor, 62 &mut bos_descriptor,
63 &mut [], 63 &mut [], // no msos descriptors
64 &mut control_buf, 64 &mut control_buf,
65 ); 65 );
66 66
diff --git a/examples/stm32f1/src/bin/usb_serial.rs b/examples/stm32f1/src/bin/usb_serial.rs
index 60eb5d0e4..31519555f 100644
--- a/examples/stm32f1/src/bin/usb_serial.rs
+++ b/examples/stm32f1/src/bin/usb_serial.rs
@@ -60,6 +60,7 @@ async fn main(_spawner: Spawner) {
60 &mut device_descriptor, 60 &mut device_descriptor,
61 &mut config_descriptor, 61 &mut config_descriptor,
62 &mut bos_descriptor, 62 &mut bos_descriptor,
63 &mut [], // no msos descriptors
63 &mut control_buf, 64 &mut control_buf,
64 ); 65 );
65 66
diff --git a/examples/stm32f3/src/bin/usb_serial.rs b/examples/stm32f3/src/bin/usb_serial.rs
index a9537c77b..d5d068d62 100644
--- a/examples/stm32f3/src/bin/usb_serial.rs
+++ b/examples/stm32f3/src/bin/usb_serial.rs
@@ -57,6 +57,7 @@ async fn main(_spawner: Spawner) {
57 &mut device_descriptor, 57 &mut device_descriptor,
58 &mut config_descriptor, 58 &mut config_descriptor,
59 &mut bos_descriptor, 59 &mut bos_descriptor,
60 &mut [], // no msos descriptors
60 &mut control_buf, 61 &mut control_buf,
61 ); 62 );
62 63
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml
index bcf373712..f81821904 100644
--- a/examples/stm32f4/Cargo.toml
+++ b/examples/stm32f4/Cargo.toml
@@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
10embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 12embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
13embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor"] } 13embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt" ] }
14embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } 14embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] }
15 15
16defmt = "0.3" 16defmt = "0.3"
diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs
index 45dcf56af..34407b95a 100644
--- a/examples/stm32f4/src/bin/usb_ethernet.rs
+++ b/examples/stm32f4/src/bin/usb_ethernet.rs
@@ -94,7 +94,7 @@ async fn main(spawner: Spawner) {
94 &mut make_static!([0; 256])[..], 94 &mut make_static!([0; 256])[..],
95 &mut make_static!([0; 256])[..], 95 &mut make_static!([0; 256])[..],
96 &mut make_static!([0; 256])[..], 96 &mut make_static!([0; 256])[..],
97 &mut [], 97 &mut [], // no msos descriptors
98 &mut make_static!([0; 128])[..], 98 &mut make_static!([0; 128])[..],
99 ); 99 );
100 100
diff --git a/examples/stm32f4/src/bin/usb_serial.rs b/examples/stm32f4/src/bin/usb_serial.rs
index 3ab9a6c56..3e05b0ef2 100644
--- a/examples/stm32f4/src/bin/usb_serial.rs
+++ b/examples/stm32f4/src/bin/usb_serial.rs
@@ -77,7 +77,7 @@ async fn main(_spawner: Spawner) {
77 &mut device_descriptor, 77 &mut device_descriptor,
78 &mut config_descriptor, 78 &mut config_descriptor,
79 &mut bos_descriptor, 79 &mut bos_descriptor,
80 &mut [], 80 &mut [], // no msos descriptors
81 &mut control_buf, 81 &mut control_buf,
82 ); 82 );
83 83
diff --git a/examples/stm32f7/src/bin/usb_serial.rs b/examples/stm32f7/src/bin/usb_serial.rs
index 2f832c234..6aca732b4 100644
--- a/examples/stm32f7/src/bin/usb_serial.rs
+++ b/examples/stm32f7/src/bin/usb_serial.rs
@@ -77,6 +77,7 @@ async fn main(_spawner: Spawner) {
77 &mut device_descriptor, 77 &mut device_descriptor,
78 &mut config_descriptor, 78 &mut config_descriptor,
79 &mut bos_descriptor, 79 &mut bos_descriptor,
80 &mut [], // no msos descriptors
80 &mut control_buf, 81 &mut control_buf,
81 ); 82 );
82 83
diff --git a/examples/stm32g4/src/bin/usb_serial.rs b/examples/stm32g4/src/bin/usb_serial.rs
index 188988b14..378e7b988 100644
--- a/examples/stm32g4/src/bin/usb_serial.rs
+++ b/examples/stm32g4/src/bin/usb_serial.rs
@@ -75,6 +75,7 @@ async fn main(_spawner: Spawner) {
75 &mut device_descriptor, 75 &mut device_descriptor,
76 &mut config_descriptor, 76 &mut config_descriptor,
77 &mut bos_descriptor, 77 &mut bos_descriptor,
78 &mut [], // no msos descriptors
78 &mut control_buf, 79 &mut control_buf,
79 ); 80 );
80 81
diff --git a/examples/stm32h5/src/bin/usb_serial.rs b/examples/stm32h5/src/bin/usb_serial.rs
index 13b218d00..7d45818af 100644
--- a/examples/stm32h5/src/bin/usb_serial.rs
+++ b/examples/stm32h5/src/bin/usb_serial.rs
@@ -82,6 +82,7 @@ async fn main(_spawner: Spawner) {
82 &mut device_descriptor, 82 &mut device_descriptor,
83 &mut config_descriptor, 83 &mut config_descriptor,
84 &mut bos_descriptor, 84 &mut bos_descriptor,
85 &mut [], // no msos descriptors
85 &mut control_buf, 86 &mut control_buf,
86 ); 87 );
87 88
diff --git a/examples/stm32h7/src/bin/usb_serial.rs b/examples/stm32h7/src/bin/usb_serial.rs
index 648ff6eea..f80cf63ec 100644
--- a/examples/stm32h7/src/bin/usb_serial.rs
+++ b/examples/stm32h7/src/bin/usb_serial.rs
@@ -78,6 +78,7 @@ async fn main(_spawner: Spawner) {
78 &mut device_descriptor, 78 &mut device_descriptor,
79 &mut config_descriptor, 79 &mut config_descriptor,
80 &mut bos_descriptor, 80 &mut bos_descriptor,
81 &mut [], // no msos descriptors
81 &mut control_buf, 82 &mut control_buf,
82 ); 83 );
83 84
diff --git a/examples/stm32l4/src/bin/usb_serial.rs b/examples/stm32l4/src/bin/usb_serial.rs
index d459245d5..d977398f5 100644
--- a/examples/stm32l4/src/bin/usb_serial.rs
+++ b/examples/stm32l4/src/bin/usb_serial.rs
@@ -72,6 +72,7 @@ async fn main(_spawner: Spawner) {
72 &mut device_descriptor, 72 &mut device_descriptor,
73 &mut config_descriptor, 73 &mut config_descriptor,
74 &mut bos_descriptor, 74 &mut bos_descriptor,
75 &mut [], // no msos descriptors
75 &mut control_buf, 76 &mut control_buf,
76 ); 77 );
77 78
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs
index f5b3ca34c..923193abf 100644
--- a/examples/stm32l5/src/bin/usb_ethernet.rs
+++ b/examples/stm32l5/src/bin/usb_ethernet.rs
@@ -82,6 +82,7 @@ async fn main(spawner: Spawner) {
82 &mut make_static!([0; 256])[..], 82 &mut make_static!([0; 256])[..],
83 &mut make_static!([0; 256])[..], 83 &mut make_static!([0; 256])[..],
84 &mut make_static!([0; 256])[..], 84 &mut make_static!([0; 256])[..],
85 &mut [], // no msos descriptors
85 &mut make_static!([0; 128])[..], 86 &mut make_static!([0; 128])[..],
86 ); 87 );
87 88
diff --git a/examples/stm32l5/src/bin/usb_hid_mouse.rs b/examples/stm32l5/src/bin/usb_hid_mouse.rs
index bec3d5e4e..f64d0f34e 100644
--- a/examples/stm32l5/src/bin/usb_hid_mouse.rs
+++ b/examples/stm32l5/src/bin/usb_hid_mouse.rs
@@ -62,6 +62,7 @@ async fn main(_spawner: Spawner) {
62 &mut device_descriptor, 62 &mut device_descriptor,
63 &mut config_descriptor, 63 &mut config_descriptor,
64 &mut bos_descriptor, 64 &mut bos_descriptor,
65 &mut [], // no msos descriptors
65 &mut control_buf, 66 &mut control_buf,
66 ); 67 );
67 68
diff --git a/examples/stm32l5/src/bin/usb_serial.rs b/examples/stm32l5/src/bin/usb_serial.rs
index ff1154f92..58a8898a6 100644
--- a/examples/stm32l5/src/bin/usb_serial.rs
+++ b/examples/stm32l5/src/bin/usb_serial.rs
@@ -57,6 +57,7 @@ async fn main(_spawner: Spawner) {
57 &mut device_descriptor, 57 &mut device_descriptor,
58 &mut config_descriptor, 58 &mut config_descriptor,
59 &mut bos_descriptor, 59 &mut bos_descriptor,
60 &mut [], // no msos descriptors
60 &mut control_buf, 61 &mut control_buf,
61 ); 62 );
62 63
diff --git a/examples/stm32u5/src/bin/usb_serial.rs b/examples/stm32u5/src/bin/usb_serial.rs
index eaa1c2912..a218d5dfd 100644
--- a/examples/stm32u5/src/bin/usb_serial.rs
+++ b/examples/stm32u5/src/bin/usb_serial.rs
@@ -67,6 +67,7 @@ async fn main(_spawner: Spawner) {
67 &mut device_descriptor, 67 &mut device_descriptor,
68 &mut config_descriptor, 68 &mut config_descriptor,
69 &mut bos_descriptor, 69 &mut bos_descriptor,
70 &mut [], // no msos descriptors
70 &mut control_buf, 71 &mut control_buf,
71 ); 72 );
72 73