mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Changed the signature of the CALLBACK_USB_GetDescriptor() callback function so that the descriptor pointer is const, to remove the need for extra casting inside the callback (thanks to Jonathan Kollasch).
This commit is contained in:
@@ -254,8 +254,8 @@ static void USB_Device_GetInternalSerialDescriptor(void)
|
||||
|
||||
static void USB_Device_GetDescriptor(void)
|
||||
{
|
||||
void* DescriptorPointer;
|
||||
uint16_t DescriptorSize;
|
||||
const void* DescriptorPointer;
|
||||
uint16_t DescriptorSize;
|
||||
|
||||
#if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
|
||||
uint8_t DescriptorAddressSpace;
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
*/
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
void** const DescriptorAddress
|
||||
const void** const DescriptorAddress
|
||||
#if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
|
||||
, uint8_t* MemoryAddressSpace
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user