Add NO_INTERNAL_SERIAL compile time option to bootloaders to prevent them from having...
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / DevChapter9.c
index 9acf300..4014ed1 100644 (file)
@@ -179,17 +179,17 @@ static void USB_Device_GetDescriptor(void)
        void*    DescriptorPointer;\r
        uint16_t DescriptorSize;\r
        \r
-       #if defined(USE_INTERNAL_SERIAL)\r
+       #if !defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))\r
        if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL))\r
        {\r
-               uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 20)];\r
+               uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 12)];\r
 \r
                SignatureDescriptor[0] = sizeof(SignatureDescriptor);\r
                SignatureDescriptor[1] = DTYPE_String;\r
                \r
                uint16_t* SigUnicodeChars = (uint16_t*)&SignatureDescriptor[2];\r
 \r
-               for (uint8_t SerialByteNum = 0; SerialByteNum < 10; SerialByteNum++)\r
+               for (uint8_t SerialByteNum = 0; SerialByteNum < 6; SerialByteNum++)\r
                {\r
                        char ConvSigString[3];\r
 \r