diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-30 14:01:41 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-30 14:01:41 +0000 |
commit | 152b2764c3c719e3e9e34ee60b5db8d99ff2611b (patch) | |
tree | ad8580af599e27a1a8e1ca0baa5f1f7e27568ba7 /LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c | |
parent | e95c96ea20117dbf43bd37e4abb5bad974f30816 (diff) | |
download | lufa-152b2764c3c719e3e9e34ee60b5db8d99ff2611b.tar.gz lufa-152b2764c3c719e3e9e34ee60b5db8d99ff2611b.tar.bz2 lufa-152b2764c3c719e3e9e34ee60b5db8d99ff2611b.zip |
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.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c index f6a6e5ebe..07a3d4292 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c @@ -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) |