mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-29 21:31:08 +00:00
[embassy-usb-dfu] correct comment about composite devices
This commit is contained in:
parent
f7c796e3cc
commit
46e25cbc5f
@ -137,8 +137,9 @@ pub fn usb_dfu<'d, D: Driver<'d>, MARK: DfuMarker, RST: Reset>(
|
|||||||
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
||||||
// Otherwise users need to do this manually using a tool like Zadig.
|
// Otherwise users need to do this manually using a tool like Zadig.
|
||||||
//
|
//
|
||||||
// Adding them here on the function level appears to only work for compositive devices though.
|
// Adding them here on the function level appears to only be needed for compositive devices.
|
||||||
// For non-composite devices they should be placed on the device level instead.
|
// In addition to being on the function level, they should also be added to the device level.
|
||||||
|
//
|
||||||
func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
||||||
func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
||||||
"DeviceInterfaceGUIDs",
|
"DeviceInterfaceGUIDs",
|
||||||
|
@ -193,8 +193,9 @@ pub fn usb_dfu<'d, D: Driver<'d>, DFU: NorFlash, STATE: NorFlash, RST: Reset, co
|
|||||||
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
||||||
// Otherwise users need to do this manually using a tool like Zadig.
|
// Otherwise users need to do this manually using a tool like Zadig.
|
||||||
//
|
//
|
||||||
// Adding them here on the function level appears to only work for compositive devices though.
|
// Adding them here on the function level appears to only be needed for compositive devices.
|
||||||
// For non-composite devices they should be placed on the device level instead.
|
// In addition to being on the function level, they should also be added to the device level.
|
||||||
|
//
|
||||||
func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
||||||
func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
||||||
"DeviceInterfaceGUIDs",
|
"DeviceInterfaceGUIDs",
|
||||||
|
@ -59,13 +59,11 @@ async fn main(_spawner: Spawner) {
|
|||||||
|
|
||||||
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
||||||
// Otherwise users need to do this manually using a tool like Zadig.
|
// Otherwise users need to do this manually using a tool like Zadig.
|
||||||
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
|
|
||||||
|
|
||||||
// In the case of non-composite devices, it seems that feature headers need to be on the device level.
|
|
||||||
// (As is implemented here)
|
|
||||||
//
|
//
|
||||||
// For composite devices however, they should be on the function level instead.
|
// It seems these always need to be at added at the device level for this to work and for
|
||||||
// (This is achieved by passing a GUID to the "usb_dfu" function)
|
// composite devices they also need to be added on the function level (as shown later).
|
||||||
|
//
|
||||||
|
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
|
||||||
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
||||||
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
||||||
"DeviceInterfaceGUIDs",
|
"DeviceInterfaceGUIDs",
|
||||||
|
@ -67,13 +67,11 @@ fn main() -> ! {
|
|||||||
|
|
||||||
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
// We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows.
|
||||||
// Otherwise users need to do this manually using a tool like Zadig.
|
// Otherwise users need to do this manually using a tool like Zadig.
|
||||||
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
|
|
||||||
|
|
||||||
// In the case of non-composite devices, it seems that feature headers need to be on the device level.
|
|
||||||
// (As is implemented here)
|
|
||||||
//
|
//
|
||||||
// For composite devices however, they should be on the function level instead.
|
// It seems these always need to be at added at the device level for this to work and for
|
||||||
// (This is achieved by passing a GUID to the "usb_dfu" function)
|
// composite devices they also need to be added on the function level (as shown later).
|
||||||
|
//
|
||||||
|
builder.msos_descriptor(msos::windows_version::WIN8_1, 2);
|
||||||
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", ""));
|
||||||
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new(
|
||||||
"DeviceInterfaceGUIDs",
|
"DeviceInterfaceGUIDs",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user