mirror of
https://github.com/mfulz/qmk_firmware.git
synced 2025-06-24 23:55:18 +02:00
Remove internal USB_Device_NibbleToASCII() function in favour of manually inlined code to prevent compilation errors in -O0 optimisation level.
This commit is contained in:
parent
3988639823
commit
55da77d85f
@ -198,12 +198,6 @@ static void USB_Device_GetConfiguration(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
|
#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)
|
static void USB_Device_GetInternalSerialDescriptor(void)
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
@ -229,7 +223,10 @@ static void USB_Device_GetInternalSerialDescriptor(void)
|
|||||||
SigReadAddress++;
|
SigReadAddress++;
|
||||||
}
|
}
|
||||||
|
|
||||||
SignatureDescriptor.UnicodeString[SerialCharNum] = USB_Device_NibbleToASCII(SerialByte);
|
SerialByte &= 0x0F;
|
||||||
|
|
||||||
|
SignatureDescriptor.UnicodeString[SerialCharNum] = (SerialByte >= 10) ?
|
||||||
|
(('A' - 10) + SerialByte) : ('0' + SerialByte);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,6 @@
|
|||||||
static void USB_Device_ClearSetFeature(void);
|
static void USB_Device_ClearSetFeature(void);
|
||||||
|
|
||||||
#if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
|
#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);
|
static void USB_Device_GetInternalSerialDescriptor(void);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user