diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rp/src/bin/usb_raw.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/rp/src/bin/usb_raw.rs b/examples/rp/src/bin/usb_raw.rs index e0e5daa54..044e728a0 100644 --- a/examples/rp/src/bin/usb_raw.rs +++ b/examples/rp/src/bin/usb_raw.rs | |||
| @@ -70,6 +70,12 @@ async fn main(_spawner: Spawner) { | |||
| 70 | &mut control_buf, | 70 | &mut control_buf, |
| 71 | ); | 71 | ); |
| 72 | 72 | ||
| 73 | // Add the Microsoft OS Descriptor (MSOS/MOD) descriptor. | ||
| 74 | // We tell Windows that this entire device is compatible with the "WINUSB" feature, | ||
| 75 | // which causes it to use the built-in WinUSB driver automatically, which in turn | ||
| 76 | // can be used by libusb/rusb software without needing a custom driver or INF file. | ||
| 77 | // In principle you might want to call msos_feature() just on a specific function, | ||
| 78 | // if your device also has other functions that still use standard class drivers. | ||
| 73 | builder.msos_descriptor(windows_version::WIN8_1, 0); | 79 | builder.msos_descriptor(windows_version::WIN8_1, 0); |
| 74 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 80 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| 75 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | 81 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( |
