From b13554cb50f931936c6a2552a090aab24b518b25 Mon Sep 17 00:00:00 2001 From: Anders Lindvall Date: Wed, 30 Oct 2013 11:35:14 +0100 Subject: [PATCH] This fixes #2 - LabTool USB Enumeration Fail on Windows 8.1. Reported and solved by B.VERNOUX. --- fw/program/source/usb_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fw/program/source/usb_descriptors.c b/fw/program/source/usb_descriptors.c index 0a81b6b..4b7d2a4 100644 --- a/fw/program/source/usb_descriptors.c +++ b/fw/program/source/usb_descriptors.c @@ -78,7 +78,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, - .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), // v0.97 used sizeof(...)-1 + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t) - 1, /* B.VERNOUX Last byte LabTool_Termination shall be not sent remove 1, v0.97 used sizeof(...)-1 */ .TotalInterfaces = 1, .ConfigurationNumber = 1, @@ -208,7 +208,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, break; case DTYPE_Configuration: Address = &ConfigurationDescriptor; - Size = sizeof(USB_Descriptor_Configuration_t); + Size = sizeof(USB_Descriptor_Configuration_t) - 1; /* B.VERNOUX Last byte LabTool_Termination shall be not sent */ break; case DTYPE_String: switch (DescriptorNumber)