Skip to content

Commit 68f3538

Browse files
committed
Further testing discovered the registry key is actually unnecessary.
1 parent bed8aa7 commit 68f3538

4 files changed

Lines changed: 2 additions & 20 deletions

File tree

Demos/Device/LowLevel/WebUSB/Config/AppConfig.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
#define WEBUSB_LANDING_PAGE_INDEX 0
5050

5151
#define MS_OS_20_VENDOR_CODE 0x45 // Must be different than WEBUSB_VENDOR_CODE
52-
#define MS_OS_20_DESCRIPTOR_SET_TOTAL_LENGTH (10 + 20 + 132)
53-
// python -c "import uuid;print('u\"{' + str(uuid.uuid4()) + '}\\\0\"')"
54-
#define MS_OS_20_DEVICE_GUID_STRING_OF_STRING u"{94e78d93-4cbb-481f-b542-a74740d3a713}\0" // FIXME: Generate a unique GUID for your device.
52+
#define MS_OS_20_DESCRIPTOR_SET_TOTAL_LENGTH (10 + 20)
5553

5654
#endif

Demos/Device/LowLevel/WebUSB/Descriptors.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
{
6969
MS_OS_20_Descriptor_Set_Header_t Header;
7070
MS_OS_20_CompatibleID_Descriptor CompatibleID;
71-
MS_OS_20_Registry_Property_Descriptor RegistryData;
7271
} MS_OS_20_Descriptor_t;
7372

7473
/** Enum for the device interface descriptor IDs within the device. Each interface descriptor

Demos/Device/LowLevel/WebUSB/MS_OS_20_Device.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
/* $ python -c "import uuid;print(', '.join(map(hex, uuid.UUID('D8DD60DF-4589-4CC7-9CD2-659D9E648A9F').bytes_le)))" */
4343
#define MS_OS_20_PLATFORM_UUID 0xdf, 0x60, 0xdd, 0xd8, 0x89, 0x45, 0xc7, 0x4c, 0x9c, 0xd2, 0x65, 0x9d, 0x9e, 0x64, 0x8a, 0x9f
4444

45-
#define MS_OS_20_WINDOWS_VERSION CPU_TO_LE32(0x06030000) // Windows version (8.1)
45+
#define MS_OS_20_WINDOWS_VERSION 0x06030000 // Windows version (8.1)
4646

4747
#define MS_OS_20_ALTERNATE_ENUMERATION_CODE 0 /**< Set to non-zero to enable Windows to allow device to return alternate USB descriptors. */
4848

@@ -153,10 +153,6 @@
153153
/** \brief Microsoft OS 2.0 Registry Property Descriptor.
154154
*
155155
* This descriptor is used to add per-device or per-function registry values that is read by the Windows USB driver stack or the device’s function driver.
156-
*
157-
* For WebUSB in Chrome, for a single interface, we need to create a registry key DeviceInterfaceGUIDs of type REG_MULTI_SZ
158-
* and a value of a GUID. For more information, see:
159-
* https://github.com/pbatard/libwdi/wiki/WCID-Devices#defining-a-device-interface-guid-or-other-device-specific-properties
160156
*/
161157
typedef struct {
162158
uint16_t Length; /**< The length in bytes of is descriptor. */

Demos/Device/LowLevel/WebUSB/WebUSB.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,6 @@ const MS_OS_20_Descriptor_t PROGMEM MS_OS_20_Descriptor =
136136
.DescriptorType = CPU_TO_LE16(MS_OS_20_FEATURE_COMPATBLE_ID),
137137
.CompatibleID = u8"WINUSB\x00", // Automatically null-terminated to 8 bytes
138138
.SubCompatibleID = {0, 0, 0, 0, 0, 0, 0, 0}
139-
},
140-
141-
.RegistryData =
142-
{
143-
.Length = CPU_TO_LE16(10 + 42 + 80),
144-
.DescriptorType = CPU_TO_LE16(MS_OS_20_FEATURE_REG_PROPERTY),
145-
.PropertyDataType = CPU_TO_LE16(MS_OS_20_REG_MULTI_SZ),
146-
.PropertyNameLength = CPU_TO_LE16(sizeof(MS_OS_20_REGISTRY_KEY)),
147-
.PropertyName = MS_OS_20_REGISTRY_KEY, // 42 bytes
148-
.PropertyDataLength = CPU_TO_LE16(sizeof(MS_OS_20_DEVICE_GUID_STRING_OF_STRING)),
149-
.PropertyData = MS_OS_20_DEVICE_GUID_STRING_OF_STRING // 80 bytes
150139
}
151140
};
152141

0 commit comments

Comments
 (0)