Skip to content

Commit 624f170

Browse files
committed
[embassy-usb-dfu] correct comment about composite devices
1 parent f7c796e commit 624f170

File tree

2 files changed

+8
-12
lines changed
  • examples/boot

2 files changed

+8
-12
lines changed

examples/boot/application/stm32wb-dfu/src/main.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ async fn main(_spawner: Spawner) {
5959

6060
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
6161
// Otherwise users need to do this manually using a tool like Zadig.
62-
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
63-
64-
// In the case of non-composite devices, it seems that feature headers need to be on the device level.
65-
// (As is implemented here)
6662
//
67-
// For composite devices however, they should be on the function level instead.
68-
// (This is achieved by passing a GUID to the "usb_dfu" function)
63+
// It seems these always need to be at added at the device level for this to work and for
64+
// composite devices they also need to be added on the function level (as shown later).
65+
//
66+
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
6967
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
7068
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
7169
"DeviceInterfaceGUIDs",

examples/boot/bootloader/stm32wb-dfu/src/main.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ fn main() -> ! {
6767

6868
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
6969
// Otherwise users need to do this manually using a tool like Zadig.
70-
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
71-
72-
// In the case of non-composite devices, it seems that feature headers need to be on the device level.
73-
// (As is implemented here)
7470
//
75-
// For composite devices however, they should be on the function level instead.
76-
// (This is achieved by passing a GUID to the "usb_dfu" function)
71+
// It seems these always need to be at added at the device level for this to work and for
72+
// composite devices they also need to be added on the function level (as shown later).
73+
//
74+
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
7775
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
7876
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
7977
"DeviceInterfaceGUIDs",

0 commit comments

Comments
 (0)