diff --git a/firmware/main.c b/firmware/main.c index 740c36b..d1e2a0d 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -35,8 +35,155 @@ static unsigned int prog_pagesize; static uchar prog_blockflags; static uchar prog_pagecounter; + +/* USBasp default winusb driver for Windows. + + Based on the hard work by Marius Greuel @mariusgreuel ( https://github.com/mariusgreuel/USBasp ). + This is a non intrusive version, using an unaltered V-USB with no changes in it's usbdrv code. + + To avoid using driver installation (Zadig, libusb) on Windows and use by default + the winusb default driver for USBasp, we need to use OS feature descriptors. + All USB 2.0 devices, when they are enumerated for the first time, Windows asks if + there is an OS feature descriptor by sending a specific standard GET_DESCRIPTOR request + with the format : + + -------------------------------------------------------------------------------------------------- + | bmRequestType | bRequest | wValue | wIndex | wLength | Data | + -------------------------------------------------------------------------------------------------- + | 1000 0000B | GET_DESCRIPTOR | 0x03EE | 0x0000 | 0x12 | Returned string | + -------------------------------------------------------------------------------------------------- + + It asks if there is a specific string descriptor at index 0xEE. Because this string + descriptor request, is not by default handled by the V-USB, we change the USB_CFG_DESCR_PROPS_UNKNOWN + to be dynamic (USB_PROP_IS_DYNAMIC). This effectively tell the V-USB that for every + unknown string index request to call the usbFunctionDescriptor function. + + usbFunctionDescriptor function returns an OS string descriptor using the version 1.00 format + which has a fixed length of 18 bytes, with a structure as shown in the following table : + + -------------------------------------------------------------------------- + | Length | Type | Signature | MS Vendor Code | Pad | + -------------------------------------------------------------------------- + | 0x12 | 0x03 | MSFT100 | unsigned byte | 0x00 | + -------------------------------------------------------------------------- + + Length: An unsigned byte and MUST be set to 0x12. + + Type: An unsigned byte and MUST be set to 0x03. + + Signature: A Unicode string and MUST be set to "MSFT100". + + MS Vendor Code: An unsigned byte, it will be used to retrieve associated feature descriptors. + + Pad: An unsigned byte and MUST be set to 0x00. + + The Signature field contains a Unicode character array that identifies the descriptor as an + OS string descriptor and includes the version number. For version 1.00, this array must be set + to "MSFT100" (0x4D00 0x5300 0x4600 0x5400 0x3100 0x3000 0x3000). + + The MS VendorCode field is used to retrieve the associated feature descriptors. This code is + used as Request field in TS_URB_CONTROL_VENDOR_OR_CLASS_REQUEST section 2.2.9.12. + + In usbFunctionSetup we handle the feature request associated to MS Vendor Code we replied earlier + and send an Extended Compat ID with the information that we want Windows to load the winusb default driver. + + For More information see + + https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors + https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpeusb/c2f351f9-84d2-4a1b-9fe3-a6ca195f84d0 + + + !!! Notice !!! + + "After the operating system requests a Microsoft OS String Descriptor from a device, it creates the following registry key: + + HLKM\SYSTEM\CurrentControlSet\Control\UsbFlags\vvvvpppprrrrr + + The operating system creates a registry entry, named osvc, under this registry key that indicates + whether the device supports Microsoft OS Descriptors. If the device does not provide a valid response + the first time that the operating system queries it for a Microsoft OS String Descriptor, + the operating system will make no further requests for that descriptor." + + If your firmware doesn't work please delete the registry key as stated above to retrigger a query from Windows. + + i.e. if your firmware has a device version of 0x07, 0x01 then there will be a registry key with the name : + + Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\16C005DC0107 + +*/ + + +/* For Windows OS Descriptors we need to report that we support USB 2.0 */ + +PROGMEM const char usbDescriptorDevice[18] = { /* USB device descriptor */ + 18, /* sizeof(usbDescriptorDevice): length of descriptor in bytes */ + USBDESCR_DEVICE, /* descriptor type */ + 0x00, 0x02, /* USB version supported */ + USB_CFG_DEVICE_CLASS, + USB_CFG_DEVICE_SUBCLASS, + 0, /* protocol */ + 8, /* max packet size */ + /* the following two casts affect the first byte of the constant only, but + * that's sufficient to avoid a warning with the default values. + */ + (char)USB_CFG_VENDOR_ID,/* 2 bytes */ + (char)USB_CFG_DEVICE_ID,/* 2 bytes */ + USB_CFG_DEVICE_VERSION, /* 2 bytes */ + 1, /*USB_CFG_DESCR_PROPS_STRING_VENDOR != 0 ? 1 : 0,*/ /* manufacturer string index */ + 2, /*USB_CFG_DESCR_PROPS_STRING_PRODUCT != 0 ? 2 : 0, */ /* product string index */ + 3, /* USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER != 0 ? 3 : 0, */ /* serial number string index */ + 1, /* number of configurations */ +}; + +/* OS Extended Compat ID feature descriptor */ + +PROGMEM const char OS_EXTENDED_COMPAT_ID[37] = { + /* Header */ + 0x25, /* OS Extended Compat ID feature descriptor length */ + 0x01, 0x00, /* OS Extended Compat ID version */ + 0x00, 0x04, /* Index */ + 0x01, /* Configurations count */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Reserved */ + /* Configuration */ + 0x00, /* First Interface Number */ + 0x01, /* Reserved */ + 'W','I','N','U','S','B', 0x00, 0x00, /* Windows string Compatible ID */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Windows string SubCompatible ID */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* Reserved */ +}; + +#define MS_VENDOR_CODE 0x5D +PROGMEM const char OS_STRING_DESCRIPTOR[18] = { + 0x12, /* Length: An unsigned byte and MUST be set to 0x12. */ + /* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-interface-model-supplement */ + 0x03, /* Type: An unsigned byte and MUST be set to 0x03. */ + 'M',0,'S',0,'F',0,'T',0,'1',0,'0',0,'0',0, /* Signature: A Unicode string and MUST be set to "MSFT100". */ + MS_VENDOR_CODE, /* MS Vendor Code: An unsigned byte, + it will be used to retrieve associated feature descriptors. */ + 0x00 /* Pad: An unsigned byte and MUST be set to 0x00. */ +}; + +usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { + + // DBG1(0xEE, &rq->wValue.bytes[0], 2); + + /* string (3) request at index 0xEE, is an OS string descriptor request */ + if ((rq->wValue.bytes[1] == 3) && (rq->wValue.bytes[0] == 0xEE)) { + + usbMsgPtr = (usbMsgPtr_t)&OS_STRING_DESCRIPTOR; + + return sizeof(OS_STRING_DESCRIPTOR); + + }; + + return 0; + +}; + uchar usbFunctionSetup(uchar data[8]) { + const usbRequest_t* request = (const usbRequest_t*)data; + uchar len = 0; if (data[1] == USBASP_FUNC_CONNECT) { @@ -178,15 +325,21 @@ uchar usbFunctionSetup(uchar data[8]) { prog_state = PROG_STATE_TPI_WRITE; len = 0xff; /* multiple out */ - } else if (data[1] == USBASP_FUNC_GETCAPABILITIES) { - replyBuffer[0] = USBASP_CAP_0_TPI; - replyBuffer[1] = 0; - replyBuffer[2] = 0; - replyBuffer[3] = 0; - len = 4; - } - - usbMsgPtr = replyBuffer; + /* Handle the OS feature request associated with the MS Vendor Code + we replied earlier in the OS String Descriptor request. See usbFunctionDescriptor. */ + } else if (request->bRequest == MS_VENDOR_CODE) { + if (request->wIndex.word == 0x0004) + { + /* Send the Extended Compat ID OS feature descriptor, + requesting to load the default winusb driver for us */ + usbMsgPtr = (usbMsgPtr_t)&OS_EXTENDED_COMPAT_ID; + return sizeof(OS_EXTENDED_COMPAT_ID); + } + + return 0; + } + + usbMsgPtr = replyBuffer; return len; } diff --git a/firmware/main_winusb.hex b/firmware/main_winusb.hex new file mode 100644 index 0000000..a2dc531 --- /dev/null +++ b/firmware/main_winusb.hex @@ -0,0 +1,257 @@ +:1000000057C0AEC170C06FC06EC06DC06CC06BC059 +:100010006AC069C068C067C066C065C064C063C0AC +:1000200062C061C060C009021200010100A019098C +:1000300004000000000000000E03550053004200C1 +:100040006100730070001C037700770077002E00BA +:10005000660069007300630068006C002E00640095 +:1000600065000403090412034D00530046005400C8 +:100070003100300030005D00250100000401000067 +:100080000000000000000157494E55534200000097 +:10009000000000000000000000000000001201004D +:1000A00002FF000008C016DC050701010203010081 +:1000B00011241FBECFE5D4E0DEBFCDBF10E0A0E627 +:1000C000B0E0E2EEFFE002C005900D92A236B1076B +:1000D000D9F720E0A2E6B0E001C01D92A83AB2072D +:1000E000E1F771D77CC78CCFCF93DF936091880005 +:1000F000635067FDA8C080918500CCE0D0E0C81BAC +:10010000D109C457DF4F809184008D3209F08AC035 +:10011000683009F096C083EC809377008AE580937D +:100120006100109283008881807619F0CE01BED4E0 +:1001300066C08A81109280009981911106C0109248 +:10014000810020E830E082E055C0953019F48093BA +:10015000890042C09630D1F59B81913019F48DE928 +:1001600090E004C0923041F486E290E090938700E2 +:100170008093860082E126C0933001F5811108C08A +:1001800082E690E0909387008093860084E01AC016 +:10019000813041F486E490E090938700809386005C +:1001A0008CE110C0823041F488E390E090938700A6 +:1001B000809386008EE006C0833019F0CE0165D4AE +:1001C00001C080E090E49093830019C0983079F0EA +:1001D000993031F480938B0020E830E080E00AC051 +:1001E00081E09A3009F080E020E830E003C02BE89D +:1001F00030E081E0309387002093860009C08F3F74 +:1002000039F4988197FD8E8190E89093830007C020 +:100210009F81911104C09E81981708F4892F8093C3 +:1002200060000FC08091830087FF0BC0CE010AD60B +:100230008F3F21F48EE18093610003C08111109201 +:100240006000109288008091610084FF55C0809109 +:1002500060008F3F09F450C0C82F893008F0C8E013 +:100260008C1B809360009091770088E889278093A9 +:100270007700CC2309F44BC02091830027FF08C0EE +:100280006C2F88E790E072D5C82F893078F523C0AD +:10029000809186009091870026FF0AC0A8E7B0E011 +:1002A000FC012C2F34913D9331962150D9F708C091 +:1002B000DC01E8E7F0E02C2F3D9131932150E1F78C +:1002C0002FEF2C0F30E02F5F3F4F820F931F909343 +:1002D0008700809386006C2F88E790E03DD0CC5F4C +:1002E000CC3041F08FEF8093600004C08FEF80939B +:1002F0006000CEE1C093610084E196B3937069F42D +:100300008150D9F7109289001092820006C060E0F7 +:1003100088E790E021D0C4E0E5CFDF91CF91089548 +:1003200085B7836085BF8BB780648BBF0895A82F86 +:10033000B92F80E090E041E050EA609530E009C0DC +:100340002D9182279795879510F084279527305E09 +:10035000C8F36F5FA8F30895EADF8D939D93089526 +:10036000CF93CFB7CF93C395B09BE9F7B09B09C0AC +:10037000B09B07C0B09B05C0B09B03C0B09B01C041 +:10038000A1C0DF93C0918500DD27C457DF4FB09B2C +:1003900002C0DF91EBCF2F930F931F9306B32FEF84 +:1003A00000FB20F94F933F9316B34FEF012700FB5B +:1003B00021F93BE031C04E7F012F16B3216028C0E8 +:1003C000102F4D7F2260000006B329C04B7F2460B0 +:1003D000012F000016B32BC016B3477F28602AC038 +:1003E0004F7E06B320612CC04F7D16B320622FC014 +:1003F0004F7B06B3206432C0422706B349934FEFC8 +:100400000000102710FB20F916B31370C9F1297FE3 +:1004100091F2012700FB21F906B3237F89F23150C5 +:1004200058F1102710FB22F916B3277E79F2012725 +:1004300000FB23F92F7C81F206B3102710FB24F96F +:100440002F7971F200C016B3012700FB25F92F7335 +:1004500059F200C006B3102710FB26F9223040F2F3 +:1004600000C016B3012700FB27F9243028F64F7788 +:10047000206816B30000F9CF10E41ABF002717C098 +:100480003B503195C31BD04010E41ABF0881033C98 +:10049000E9F00B34D9F0209182001981110F121369 +:1004A000EDCF093641F10D3211F0013E39F70093DD +:1004B0008A003F914F911F910F912F91DF91CAB701 +:1004C000C6FD51CFCF91CFBFCF91189520918A0013 +:1004D000222379F310918800112311F5343012F1A1 +:1004E0003093880020938400109185003BE0311BFD +:1004F0003093850017C00091880001308CF40AE524 +:100500003091610034FD10C000936100C7E7D0E076 +:100510000FC02795A8F45150A9F4220F0000F9CF7D +:100520004AE503C042ED01C0432FC4E1D0E032E010 +:1005300017B31360C09A17BB08B320E413E05F93AE +:10054000012756E008BB279520F4515021F4220FD3 +:10055000F9CF012756E000003B5A08BBD0F227959F +:1005600028F4515029F4220F0000F9CF012756E05A +:10057000279508BB20F4515021F4220FF9CF012711 +:1005800056E02991332308BB21F60C7F1091890096 +:10059000110FC651D04008BB11F01093820010E437 +:1005A0001ABF016017B31C7F402F4C7F5F9100C0C2 +:1005B00000C008BB17BB48BB7CCF8FB9779BFECF71 +:1005C0008FB10895DC01CB0121E1B695A7959795F0 +:1005D00087952A95D1F72091A4002817D9F0809308 +:1005E000A400E091A200F091A3008DE40995E091B0 +:1005F000A200F091A30080E00995E091A200F091A3 +:10060000A3008091A4000995E091A200F091A300BD +:1006100080E009940895882319F0883020F101C002 +:100620008CE02DED32E03093A3002093A2001EB8A1 +:1006300091E09093A5008A3081F028F4883081F011 +:10064000893061F006C08B3031F08D3011F41DB867 +:10065000089581E08EB981E004C09EB982E001C0B6 +:1006600083E08DB908952DE433E03093A300209307 +:10067000A20027E030E0281B310983E001C0880F89 +:100680002A95EAF78093A500089522B79091A500D6 +:1006900082B7821B8917E0F308951F93CF93DF93EE +:1006A000182FD8E0C0E017FF02C0C39A01C0C3985A +:1006B000110FCC0FB499CF5FC59AE7DFC598E5DF7E +:1006C000D15089F78C2FDF91CF911F910895BD9A5A +:1006D000BB9ABA9AC49AC29A81E066D1C2988FEF47 +:1006E0008093A400089587B3837D87BBC498C39883 +:1006F0001DB81092620008950F931F93CF93DF935C +:100700008091620081112EC08CE0809362002AC02B +:10071000C091A200D091A30082E0CD3DD80719F48A +:100720008DB180658DB913E0C29A81E03DD1C29848 +:100730008EE33AD18CEAFE01099583E5FE01099525 +:1007400080E0FE010995082F80E0FE010995033540 +:1007500079F0115049F71DB8809162008150809363 +:10076000620059DF809162008111D2CF81E001C027 +:1007700080E0DF91CF911F910F910895CF92DF928A +:10078000EF92FF926B017C011DDF8C2D8170880F31 +:10079000880F880FE091A200F091A3008062099574 +:1007A000D701C60129E0B695A795979587952A9513 +:1007B000D1F7E091A200F091A3000995D701C601FD +:1007C000B695A79597958795E091A200F091A30023 +:1007D0000995E091A200F091A30080E0FF90EF90D6 +:1007E000DF90CF900994CF92DF92EF92FF92CF9358 +:1007F000DF936B017C01C42FD22FE4DE8C2D81703E +:10080000880F880F880FE091A200F091A300806408 +:100810000995D701C60129E0B695A79597958795C3 +:100820002A95D1F7E091A200F091A3000995D70194 +:10083000C601B695A79597958795E091A200F0918E +:10084000A3000995E091A200F091A3008C2F0995D7 +:10085000DD2321F0CF3721F48FE0A6D080E00FC058 +:10086000D2B7CEE1C701B60189DF8F37B9F782B7BA +:100870008D1B8D33B8F3D2B7C150A1F781E0DF9162 +:10088000CF91FF90EF90DF90CF900895CF92DF92BD +:10089000EF92FF92CF93DF936B017C01C42F92DE26 +:1008A000E091A200F091A3008CE40995D701C60164 +:1008B00029E0B695A795979587952A95D1F7E09168 +:1008C000A200F091A3000995D701C601B695A7959E +:1008D00097958795E091A200F091A3000995E0918A +:1008E000A200F091A30080E00995CF3F19F48FE0BA +:1008F0005BD010C0D2B7CEE1C701B6013FDF8F3F5A +:1009000049F482B78D1B8D33B8F3D2B7C150A1F72C +:1009100081E001C080E0DF91CF91FF90EF90DF9008 +:10092000CF900895CF93DF93EC01E091A200F09176 +:10093000A30080EA0995E091A200F091A3008D2F19 +:100940000995E091A200F091A3008C2F0995E09108 +:10095000A200F091A30080E0DF91CF9109941F9352 +:10096000CF93DF93D82F192FC62FE091A200F091DB +:10097000A30080EC0995E091A200F091A300812FE3 +:100980000995E091A200F091A3008D2F0995E091C7 +:10099000A200F091A3008C2F09958EE105D080E094 +:1009A000DF91CF911F91089522B792B7921B9C338C +:1009B000E0F38150C9F70895BD9ABB98C39A50E2FD +:1009C00017D05A95E9F70895AC0188E605D0842F31 +:1009D00003D089E601D0852F0FD028E030E03827FA +:1009E00080FB869506D02A95D1F730FB02D000D047 +:1009F0006894BB98C39A16F0C398BB9AE091A6007E +:100A0000F091A7003197F0F7C59AE6B3E3FBE091C8 +:100A1000A600F091A7003197F0F7C598089520EC53 +:100A2000E7DF46F42A95E1F780E02AE1E5DF2A9541 +:100A3000E9F7DECF28E030E0DBDF869587F938275D +:100A40002A95D1F7D5DF27F9322772F3D1DFD0CF3E +:100A5000DB01742FB9DF84E2BFDFE1DF8D937A958C +:100A6000D1F70895DB01742FAFDF83EFB5DF8DE1A0 +:100A7000B3DF84E6B1DF8D91AFDF82E7ADDFCFDF9B +:100A80008078D9F77A9589F70895FC01238123307E +:100A900059F482818E3E41F486E690E0909387007F +:100AA0008093860082E1089580E00895CF93DF93DC +:100AB000EC018981813041F480916200ACDD1092BB +:100AC0006D00A19A04DE46C1823011F40CDEF3C041 +:100AD000833011F5E091A200F091A3008A8109957D +:100AE00080936F00E091A200F091A3008B810995A3 +:100AF00080937000E091A200F091A3008C81099591 +:100B000080937100E091A200F091A3008D8109957E +:100B10008093720084E01FC18430D1F480916D0015 +:100B200081110EC08A819B81092E000CAA0BBB0B80 +:100B30008093690090936A00A0936B00B0936C005F +:100B40008E819F81909368008093670082E0F0C05F +:100B50008730D1F480916D0081110EC08A819B8114 +:100B6000092E000CAA0BBB0B8093690090936A00BE +:100B7000A0936B00B0936C008E819F81909368006E +:100B80008093670083E0D4C0853011F4B5DD98C050 +:100B9000863079F580916D0081110EC08A819B812C +:100BA000092E000CAA0BBB0B8093690090936A007E +:100BB000A0936B00B0936C003C812D81822F8F70CD +:100BC00080936400822F807F40E1849FC0011124C4 +:100BD000830F911D909366008093650020FD8093A4 +:100BE00063008E819F81909368008093670081E00D +:100BF0009FC0883001F580916D0081110EC08A81FF +:100C00009B81092E000CAA0BBB0B8093690090936B +:100C10006A00A0936B00B0936C0010926600109273 +:100C20006500109264008E819F819093680080938C +:100C3000670084E07DC0893081F481E080936D009D +:100C40008A819B81AC81BD818093690090936A0009 +:100C5000A0936B00B0936C007DC08A3031F48A8120 +:100C60008093620010926F002DC08B3081F48A81D6 +:100C70009B819093A7008093A600C29ABA9A83E0C2 +:100C800093DEC298A19A80E18FDE96DE63C08C303D +:100C9000A1F480ECA1DE80E09FDE8AE085DEC29ACE +:100CA00085E082DEC29885E07FDE87B3837D87BBE7 +:100CB00088B3837D88BBA1984DC08D3029F4AFDE09 +:100CC00080936F0081E047C08E3019F48A8184DE02 +:100CD00041C08F30B1F48A819B81092E000CAA0B90 +:100CE000BB0B8093690090936A00A0936B00B09354 +:100CF0006C008E819F81909368008093670085E0EF +:100D000017C08031C9F48A819B81092E000CAA0B7F +:100D1000BB0B8093690090936A00A0936B00B09323 +:100D20006C008E819F81909368008093670086E0BD +:100D300080936E008FEF0FC08D3561F48C819D81A3 +:100D4000049781F488E790E0909387008093860071 +:100D500085E209C080E02FE630E0309387002093E1 +:100D6000860001C080E0DF91CF910895EF92FF925D +:100D70000F931F93CF93C62F20916E003EEF320F3B +:100D8000323028F48C017C01E60EF11C43C0253082 +:100D900009F04FC0462FBC018091690090916A0014 +:100DA00057DE8091690090916A00A0916B00B0912C +:100DB0006C008C0F911DA11DB11D80936900909353 +:100DC0006A00A0936B00B0936C0035C080916E00F8 +:100DD000823021F56091690070916A0080916B000A +:100DE00090916C00CBDCF801808380916900909138 +:100DF0006A00A0916B00B0916C000196A11DB11D1D +:100E00008093690090936A00A0936B00B0936C008C +:100E10000F5F1F4F0E151F05C9F606C080916900B0 +:100E200090916A007FDDDFCFC83028F410926E0009 +:100E300002C08FEF01C08C2FCF911F910F91FF90B7 +:100E4000EF900895EF92FF921F93CF93DF93162FA9 +:100E500020916E00213031F4EC017C01E10EF11C97 +:100E600010E066C02430C1F3263009F0A3C0462F3D +:100E7000BC018091690090916A00F4DD8091690065 +:100E800090916A00A0916B00B0916C00810F911D50 +:100E9000A11DB11D8093690090936A00A0936B001F +:100EA000B0936C008091670090916800811B91095C +:100EB0009093680080936700892B09F07DC01092A1 +:100EC0006E0081E07AC080916E00813009F04DC0E3 +:100ED00020916500309166006091690070916A0010 +:100EE00080916B0090916C00232B31F521E04881BB +:100EF0007ADC809167009091680001979093680078 +:100F000080936700892BC1F18091690090916A00FC +:100F1000A0916B00B0916C000196A11DB11D809352 +:100F2000690090936A00A0936B00B0936C002196C7 +:100F3000CE15DF0541F63CC020E0488154DC8091AD +:100F400063008150809363008111D3CF6091690069 +:100F500070916A0080916B0090916C00488196DCE2 +:100F60008091650080936300C4CF6881809169009F +:100F700090916A00F4DCBDCF10926E008091640005 +:100F800081FF14C08091630090E020916500309152 +:100F900066008217930751F06091690070916A00B2 +:100FA00080916B0090916C00488170DC11E0ACCFB7 +:100FB000812F03C08FEF01C080E0DF91CF911F919F +:100FC000FF90EF90089583E083BF8FEF87BB8FE1A1 +:100FD000EBDC17BAA09AA4D9789486D8FECFF894FF +:020FE000FFCF41 +:020FE200FF5AB4 +:00000001FF diff --git a/firmware/usbconfig.h b/firmware/usbconfig.h index d779fe0..7cc7276 100644 --- a/firmware/usbconfig.h +++ b/firmware/usbconfig.h @@ -210,7 +210,7 @@ the newest features and options. * */ -#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_DEVICE USB_PROP_LENGTH(18) #define USB_CFG_DESCR_PROPS_CONFIGURATION 0 #define USB_CFG_DESCR_PROPS_STRINGS 0 #define USB_CFG_DESCR_PROPS_STRING_0 0 @@ -219,7 +219,7 @@ the newest features and options. #define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 #define USB_CFG_DESCR_PROPS_HID 0 #define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN (USB_PROP_IS_DYNAMIC) /* ----------------------- Optional MCU Description ------------------------ */