From 6bda628718f67c04ed43e8328f55bdce5319c504 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 21 Jul 2010 16:19:32 +0000 Subject: Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability. Add missing const qualifiers to the demos. --- Demos/Device/Incomplete/Sideshow/Descriptors.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'Demos/Device/Incomplete/Sideshow/Descriptors.c') diff --git a/Demos/Device/Incomplete/Sideshow/Descriptors.c b/Demos/Device/Incomplete/Sideshow/Descriptors.c index f6d16c841..e05358e68 100644 --- a/Demos/Device/Incomplete/Sideshow/Descriptors.c +++ b/Demos/Device/Incomplete/Sideshow/Descriptors.c @@ -154,7 +154,9 @@ USB_OSCompatibleIDDescriptor_t PROGMEM DevCompatIDs = SubCompatibleID: "UNIV1"} }; -uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); @@ -207,11 +209,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, return Size; } -bool USB_GetOSFeatureDescriptor(const uint16_t wValue, const uint8_t wIndex, - void** const DescriptorAddress, uint16_t* const DescriptorSize) +uint16_t USB_GetOSFeatureDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) { void* Address = NULL; - uint16_t Size = 0; + uint16_t Size = NO_DESCRIPTOR; /* Check if a device level OS feature descriptor is being requested */ if (wValue == 0x0000) @@ -224,13 +227,6 @@ bool USB_GetOSFeatureDescriptor(const uint16_t wValue, const uint8_t wIndex, } } - if (Address != NULL) - { - *DescriptorAddress = Address; - *DescriptorSize = Size; - - return true; - } - - return false; + *DescriptorAddress = Address; + return Size; } \ No newline at end of file -- cgit v1.2.3