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:
@@ -249,7 +249,7 @@ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCI
|
||||
*/
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
void** const DescriptorAddress)
|
||||
const void** const DescriptorAddress)
|
||||
{
|
||||
/* Return the correct descriptors based on the selected mode */
|
||||
if (CurrentFirmwareMode == MODE_USART_BRIDGE)
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
const void** const DescriptorAddress)
|
||||
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user