aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-usb/src/msos.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-usb/src/msos.rs b/embassy-usb/src/msos.rs
index 08a5074bf..8a2889ce5 100644
--- a/embassy-usb/src/msos.rs
+++ b/embassy-usb/src/msos.rs
@@ -205,7 +205,7 @@ impl<'a> DeviceDescriptorSetBuilder<'a> {
205 let used = self.builder.used; 205 let used = self.builder.used;
206 let buf = self.builder.buf; 206 let buf = self.builder.buf;
207 // Update length in header with final length 207 // Update length in header with final length
208 let total_len = &mut buf[4..6]; 208 let total_len = &mut buf[8..10];
209 total_len.copy_from_slice((used as u16).to_le_bytes().as_slice()); 209 total_len.copy_from_slice((used as u16).to_le_bytes().as_slice());
210 210
211 MsOsDescriptorSet { 211 MsOsDescriptorSet {
@@ -528,7 +528,7 @@ impl<'a> RegistryPropertyFeatureDescriptor<'a> {
528 unsafe { core::slice::from_raw_parts(s.as_ptr() as *const u8, (s.len() + 1) * 2) } 528 unsafe { core::slice::from_raw_parts(s.as_ptr() as *const u8, (s.len() + 1) * 2) }
529 } 529 }
530 530
531 /// A registry property that sets the DeviceInterfaceGUID to the device interface class for USB devices which are 531 /// A registry property that sets the DeviceInterfaceGUIDs to the device interface class for USB devices which are
532 /// attached to a USB hub. 532 /// attached to a USB hub.
533 pub fn new_usb_deviceinterfaceguid() -> Self { 533 pub fn new_usb_deviceinterfaceguid() -> Self {
534 // Can't use defmt::panic in constant expressions (inside u16cstr!) 534 // Can't use defmt::panic in constant expressions (inside u16cstr!)
@@ -540,9 +540,9 @@ impl<'a> RegistryPropertyFeatureDescriptor<'a> {
540 }; 540 };
541 } 541 }
542 542
543 Self::new_string( 543 Self::new_multi_string(
544 u16cstr!("DeviceInterfaceGUID"), 544 u16cstr!("DeviceInterfaceGUIDs"),
545 u16cstr!("{A5DCBF10-6530-11D2-901F-00C04FB951ED}"), 545 u16cstr!("{A5DCBF10-6530-11D2-901F-00C04FB951ED}").as_slice_with_nul(),
546 ) 546 )
547 } 547 }
548 548