Fixed incorrect definition of HID_ALIGN_DATA() causing incorrect HID report item data alignment.

This commit is contained in:
Dean Camera 2010-03-24 05:58:20 +00:00
parent f79f9abd28
commit c2de01b661
2 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,7 @@
* *
* \return Left-aligned data of the given report item's pre-retrived value for the given datatype * \return Left-aligned data of the given report item's pre-retrived value for the given datatype
*/ */
#define HID_ALIGN_DATA(reportitem, type) ((type)(reportitem->Value << (sizeof(type) - reportitem->Attributes.BitSize))) #define HID_ALIGN_DATA(reportitem, type) ((type)(reportitem->Value << ((8 * sizeof(type)) - reportitem->Attributes.BitSize)))
/* Public Interface - May be used in end-application: */ /* Public Interface - May be used in end-application: */
/* Enums: */ /* Enums: */

View File

@ -31,6 +31,7 @@
* U4 series USB AVR parts * U4 series USB AVR parts
* - Fixed LowLevel MassStorage demo broken on the U2 AVRs due to double-banked endpoints * - Fixed LowLevel MassStorage demo broken on the U2 AVRs due to double-banked endpoints
* - Fixed compilation error in the AudioInput demos when MICROPHONE_BIASED_TO_HALF_RAIL is defined (thanks to C. Scott Ananian) * - Fixed compilation error in the AudioInput demos when MICROPHONE_BIASED_TO_HALF_RAIL is defined (thanks to C. Scott Ananian)
* - Fixed incorrect definition of HID_ALIGN_DATA() causing incorrect HID report item data alignment
* *
* \section Sec_ChangeLog100219 Version 100219 * \section Sec_ChangeLog100219 Version 100219
* *