Skip to content

Commit

Permalink
Further testing discovered the registry key is actually unnecessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
riggs committed Apr 18, 2018
1 parent bed8aa7 commit 68f3538
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
4 changes: 1 addition & 3 deletions Demos/Device/LowLevel/WebUSB/Config/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
#define WEBUSB_LANDING_PAGE_INDEX 0

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

#endif
1 change: 0 additions & 1 deletion Demos/Device/LowLevel/WebUSB/Descriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
{
MS_OS_20_Descriptor_Set_Header_t Header;
MS_OS_20_CompatibleID_Descriptor CompatibleID;
MS_OS_20_Registry_Property_Descriptor RegistryData;
} MS_OS_20_Descriptor_t;

/** Enum for the device interface descriptor IDs within the device. Each interface descriptor
Expand Down
6 changes: 1 addition & 5 deletions Demos/Device/LowLevel/WebUSB/MS_OS_20_Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/* $ python -c "import uuid;print(', '.join(map(hex, uuid.UUID('D8DD60DF-4589-4CC7-9CD2-659D9E648A9F').bytes_le)))" */
#define MS_OS_20_PLATFORM_UUID 0xdf, 0x60, 0xdd, 0xd8, 0x89, 0x45, 0xc7, 0x4c, 0x9c, 0xd2, 0x65, 0x9d, 0x9e, 0x64, 0x8a, 0x9f

#define MS_OS_20_WINDOWS_VERSION CPU_TO_LE32(0x06030000) // Windows version (8.1)
#define MS_OS_20_WINDOWS_VERSION 0x06030000 // Windows version (8.1)

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

Expand Down Expand Up @@ -153,10 +153,6 @@
/** \brief Microsoft OS 2.0 Registry Property Descriptor.
*
* 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.
*
* For WebUSB in Chrome, for a single interface, we need to create a registry key DeviceInterfaceGUIDs of type REG_MULTI_SZ
* and a value of a GUID. For more information, see:
* https:/pbatard/libwdi/wiki/WCID-Devices#defining-a-device-interface-guid-or-other-device-specific-properties
*/
typedef struct {
uint16_t Length; /**< The length in bytes of is descriptor. */
Expand Down
11 changes: 0 additions & 11 deletions Demos/Device/LowLevel/WebUSB/WebUSB.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,6 @@ const MS_OS_20_Descriptor_t PROGMEM MS_OS_20_Descriptor =
.DescriptorType = CPU_TO_LE16(MS_OS_20_FEATURE_COMPATBLE_ID),
.CompatibleID = u8"WINUSB\x00", // Automatically null-terminated to 8 bytes
.SubCompatibleID = {0, 0, 0, 0, 0, 0, 0, 0}
},

.RegistryData =
{
.Length = CPU_TO_LE16(10 + 42 + 80),
.DescriptorType = CPU_TO_LE16(MS_OS_20_FEATURE_REG_PROPERTY),
.PropertyDataType = CPU_TO_LE16(MS_OS_20_REG_MULTI_SZ),
.PropertyNameLength = CPU_TO_LE16(sizeof(MS_OS_20_REGISTRY_KEY)),
.PropertyName = MS_OS_20_REGISTRY_KEY, // 42 bytes
.PropertyDataLength = CPU_TO_LE16(sizeof(MS_OS_20_DEVICE_GUID_STRING_OF_STRING)),
.PropertyData = MS_OS_20_DEVICE_GUID_STRING_OF_STRING // 80 bytes
}
};

Expand Down

0 comments on commit 68f3538

Please sign in to comment.