diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2015-12-02 18:56:52 +1100 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2015-12-02 18:56:52 +1100 |
commit | 92e9cb71e290ea7e05d15f4761b8a07d786a8aa9 (patch) | |
tree | b92a141f35ade993da399a1c068839b65a2319a3 /LUFA | |
parent | f42a4f3a47f23208d70dca308d302d9ba5a80c46 (diff) | |
download | lufa-92e9cb71e290ea7e05d15f4761b8a07d786a8aa9.tar.gz lufa-92e9cb71e290ea7e05d15f4761b8a07d786a8aa9.tar.bz2 lufa-92e9cb71e290ea7e05d15f4761b8a07d786a8aa9.zip |
Fixed incorrect CALLBACK_USB_GetDescriptor() wIndex parameter type (thanks to matlo).
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/CodeTemplates/DeviceTemplate/Descriptors.c | 2 | ||||
-rw-r--r-- | LUFA/CodeTemplates/HostTemplate/HostApplication.c | 2 | ||||
-rw-r--r-- | LUFA/DoxygenPages/ChangeLog.txt | 5 | ||||
-rw-r--r-- | LUFA/DoxygenPages/MigrationInformation.txt | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/Device.h | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/LUFA/CodeTemplates/DeviceTemplate/Descriptors.c b/LUFA/CodeTemplates/DeviceTemplate/Descriptors.c index 2edbc5c3b..e9587ca9c 100644 --- a/LUFA/CodeTemplates/DeviceTemplate/Descriptors.c +++ b/LUFA/CodeTemplates/DeviceTemplate/Descriptors.c @@ -127,7 +127,7 @@ const USB_Descriptor_String_t ProductString = * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress #if defined(HAS_MULTIPLE_DESCRIPTOR_ADDRESS_SPACES) , uint8_t* const DescriptorMemorySpace diff --git a/LUFA/CodeTemplates/HostTemplate/HostApplication.c b/LUFA/CodeTemplates/HostTemplate/HostApplication.c index b92f8ed69..1482b1d4d 100644 --- a/LUFA/CodeTemplates/HostTemplate/HostApplication.c +++ b/LUFA/CodeTemplates/HostTemplate/HostApplication.c @@ -122,7 +122,7 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, * option is set, this is still required even in an application that uses host mode only. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress #if defined(HAS_MULTIPLE_DESCRIPTOR_ADDRESS_SPACES) , uint8_t* const DescriptorMemorySpace diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index bcdaa6869..2d86ec1d9 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -7,7 +7,10 @@ /** \page Page_ChangeLog Project Changelog * * \section Sec_ChangeLogXXXXXX Version XXXXXX - * None. + * <b>Fixed:</b> + * - Core: + * - The CALLBACK_USB_GetDescriptor() callback function into the user application erroneously had a uint8_t type for the wIndex + * parameter, instead of uint16_t (thanks to Matlo) * * \section Sec_ChangeLog151115 Version 151115 * <b>New:</b> diff --git a/LUFA/DoxygenPages/MigrationInformation.txt b/LUFA/DoxygenPages/MigrationInformation.txt index ad24e27e2..b98bfc170 100644 --- a/LUFA/DoxygenPages/MigrationInformation.txt +++ b/LUFA/DoxygenPages/MigrationInformation.txt @@ -11,7 +11,8 @@ * areas relevant to making older projects compatible with the API changes of each new release. * * \section Sec_MigrationXXXXXX Version XXXXXX - * None. + * <b>Device Mode</b> + * - The \c CALLBACK_USB_GetDescriptor() callback function into the user application's \c wIndex parameter is now \c uint16_t, not \c uint8_t. * * \section Sec_Migration151115 Migrating from 140928 to 151115 * <b>Non-USB Library Components</b> diff --git a/LUFA/Drivers/USB/Core/Device.h b/LUFA/Drivers/USB/Core/Device.h index 1fb14d7d4..3b8764171 100644 --- a/LUFA/Drivers/USB/Core/Device.h +++ b/LUFA/Drivers/USB/Core/Device.h @@ -131,7 +131,7 @@ * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) || defined(__DOXYGEN__)) && \ !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS)) |