mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Small tweaks to ConfigDescriptor.c/.h to ensure pointers use the correct type, and to remove const attribute from the descriptor comparator callback function pointer type define, and into the function prototype instead.
This commit is contained in:
@@ -114,17 +114,17 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
|
||||
USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
|
||||
}
|
||||
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine)
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
|
||||
{
|
||||
uint8_t ErrorCode;
|
||||
|
||||
while (*BytesRem)
|
||||
{
|
||||
uint8_t* PrevDescLoc = *CurrConfigLoc;
|
||||
uint16_t PrevBytesRem = *BytesRem;
|
||||
void* PrevDescLoc = *CurrConfigLoc;
|
||||
uint16_t PrevBytesRem = *BytesRem;
|
||||
|
||||
USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
|
||||
|
||||
|
||||
if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
|
||||
{
|
||||
if (ErrorCode == DESCRIPTOR_SEARCH_Fail)
|
||||
|
||||
Reference in New Issue
Block a user