+ Endpoint_ClearStatusStage();\r
+}\r
+\r
+#if !defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))\r
+static char USB_Device_NibbleToASCII(uint8_t Nibble)\r
+{\r
+ Nibble = ((Nibble & 0x0F) + '0');\r
+ return (Nibble > '9') ? (Nibble + ('A' - '9' - 1)) : Nibble;\r
+}\r
+\r
+static void USB_Device_GetInternalSerialDescriptor(void)\r
+{\r
+ struct\r
+ {\r
+ USB_Descriptor_Header_t Header;\r
+ int16_t UnicodeString[20];\r
+ } SignatureDescriptor;\r
+\r
+ SignatureDescriptor.Header.Type = DTYPE_String;\r
+ SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);\r
+ \r
+ uint8_t SigReadAddress = 0x0E;\r
+\r
+ for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)\r
+ {\r
+ uint8_t SerialByte = boot_signature_byte_get(SigReadAddress);\r
+ \r
+ if (SerialCharNum & 0x01)\r
+ {\r
+ SerialByte >>= 4;\r
+ SigReadAddress++;\r
+ }\r
+ \r
+ SignatureDescriptor.UnicodeString[SerialCharNum] = USB_Device_NibbleToASCII(SerialByte);\r
+ }\r
+ \r
+ Endpoint_ClearSETUP();\r
+\r
+ Endpoint_Write_Control_Stream_LE(&SignatureDescriptor, sizeof(SignatureDescriptor));\r
+\r