diff options
| author | Gerhard de Clercq <[email protected]> | 2025-05-13 15:09:53 +0200 |
|---|---|---|
| committer | Gerhard de Clercq <[email protected]> | 2025-05-13 15:13:46 +0200 |
| commit | 46e25cbc5ff62e24f86574d7ae5d872aa0c2595d (patch) | |
| tree | 2ddf612d681152dc87b2543aa2f7c4762154cc73 /examples | |
| parent | f7c796e3ccdbd559eee26fddf39413782530f977 (diff) | |
[embassy-usb-dfu] correct comment about composite devices
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/boot/application/stm32wb-dfu/src/main.rs | 10 | ||||
| -rw-r--r-- | examples/boot/bootloader/stm32wb-dfu/src/main.rs | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/examples/boot/application/stm32wb-dfu/src/main.rs b/examples/boot/application/stm32wb-dfu/src/main.rs index 68e9bc3f6..6236dfe52 100644 --- a/examples/boot/application/stm32wb-dfu/src/main.rs +++ b/examples/boot/application/stm32wb-dfu/src/main.rs | |||
| @@ -59,13 +59,11 @@ async fn main(_spawner: Spawner) { | |||
| 59 | 59 | ||
| 60 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. | 60 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. |
| 61 | // Otherwise users need to do this manually using a tool like Zadig. | 61 | // 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) | ||
| 66 | // | 62 | // |
| 67 | // For composite devices however, they should be on the function level instead. | 63 | // It seems these always need to be at added at the device level for this to work and for |
| 68 | // (This is achieved by passing a GUID to the "usb_dfu" function) | 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); | ||
| 69 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 67 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| 70 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | 68 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( |
| 71 | "DeviceInterfaceGUIDs", | 69 | "DeviceInterfaceGUIDs", |
diff --git a/examples/boot/bootloader/stm32wb-dfu/src/main.rs b/examples/boot/bootloader/stm32wb-dfu/src/main.rs index 2cd7f859d..8cfd4daa7 100644 --- a/examples/boot/bootloader/stm32wb-dfu/src/main.rs +++ b/examples/boot/bootloader/stm32wb-dfu/src/main.rs | |||
| @@ -67,13 +67,11 @@ fn main() -> ! { | |||
| 67 | 67 | ||
| 68 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. | 68 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. |
| 69 | // Otherwise users need to do this manually using a tool like Zadig. | 69 | // 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) | ||
| 74 | // | 70 | // |
| 75 | // For composite devices however, they should be on the function level instead. | 71 | // It seems these always need to be at added at the device level for this to work and for |
| 76 | // (This is achieved by passing a GUID to the "usb_dfu" function) | 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); | ||
| 77 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 75 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| 78 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | 76 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( |
| 79 | "DeviceInterfaceGUIDs", | 77 | "DeviceInterfaceGUIDs", |
