aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/DeviceStandardReq.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-03-13 23:32:32 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-03-13 23:32:32 +0000
commit02dfd7dc3ddf5f485bdd47d45867fa58b569ca2f (patch)
tree822c3654d239e3f512f9539360cae2464c641f64 /LUFA/Drivers/USB/Core/DeviceStandardReq.c
parenta7eca42996418a7fd87b3411deb368e41615f9a1 (diff)
downloadlufa-02dfd7dc3ddf5f485bdd47d45867fa58b569ca2f.tar.gz
lufa-02dfd7dc3ddf5f485bdd47d45867fa58b569ca2f.tar.bz2
lufa-02dfd7dc3ddf5f485bdd47d45867fa58b569ca2f.zip
Simplify the internal serial extraction routines for each architecture.
Diffstat (limited to 'LUFA/Drivers/USB/Core/DeviceStandardReq.c')
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index a2270f4d2..2ac6c0a54 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -204,12 +204,13 @@ static void USB_Device_GetInternalSerialDescriptor(void)
struct
{
USB_Descriptor_Header_t Header;
- uint16_t UnicodeString[20];
+ uint16_t UnicodeString[INTERNAL_SERIAL_LENGTH_BITS / 4];
} SignatureDescriptor;
SignatureDescriptor.Header.Type = DTYPE_String;
- SignatureDescriptor.Header.Size = USB_STRING_LEN(USB_Device_GetSerialString(SignatureDescriptor.UnicodeString,
- sizeof(SignatureDescriptor.UnicodeString) / sizeof(SignatureDescriptor.UnicodeString[0])));
+ SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4);
+
+ USB_Device_GetSerialString(SignatureDescriptor.UnicodeString);
Endpoint_ClearSETUP();