diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-11-21 10:16:44 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-11-21 10:16:44 +0000 |
commit | 55da77d85f0482aea9e5c401f59e9b2975a0c2a4 (patch) | |
tree | b14fa8db4a783af32005656e0de1677564d77e8b /LUFA | |
parent | 3988639823106766afe93b15a446ff197970f104 (diff) | |
download | lufa-55da77d85f0482aea9e5c401f59e9b2975a0c2a4.tar.gz lufa-55da77d85f0482aea9e5c401f59e9b2975a0c2a4.tar.bz2 lufa-55da77d85f0482aea9e5c401f59e9b2975a0c2a4.zip |
Remove internal USB_Device_NibbleToASCII() function in favour of manually inlined code to prevent compilation errors in -O0 optimisation level.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c | 11 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c index 7d7e48d9b..cceffc99f 100644 --- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c +++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c @@ -198,12 +198,6 @@ static void USB_Device_GetConfiguration(void) } #if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR) -static char USB_Device_NibbleToASCII(uint8_t Nibble) -{ - Nibble &= 0x0F; - return (Nibble >= 10) ? (('A' - 10) + Nibble) : ('0' + Nibble); -} - static void USB_Device_GetInternalSerialDescriptor(void) { struct @@ -229,7 +223,10 @@ static void USB_Device_GetInternalSerialDescriptor(void) SigReadAddress++; } - SignatureDescriptor.UnicodeString[SerialCharNum] = USB_Device_NibbleToASCII(SerialByte); + SerialByte &= 0x0F; + + SignatureDescriptor.UnicodeString[SerialCharNum] = (SerialByte >= 10) ? + (('A' - 10) + SerialByte) : ('0' + SerialByte); } } diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h index b31fe7128..6f1ba0110 100644 --- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h +++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h @@ -151,7 +151,6 @@ static void USB_Device_ClearSetFeature(void); #if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR) - static char USB_Device_NibbleToASCII(uint8_t Nibble) ATTR_ALWAYS_INLINE; static void USB_Device_GetInternalSerialDescriptor(void); #endif #endif |