/** \ingroup Group_USBClassHID
* \defgroup Group_USBClassHIDCommon Common Class Definitions
*
- * \section Sec_ModDescription Module Description
+ * \section Sec_USBClassHIDCommon_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
* HID Class.
*
HID_RI_REPORT_SIZE(8, 0x01), \
HID_RI_REPORT_COUNT(8, Buttons), \
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), \
- HID_RI_REPORT_SIZE(8, (8 - (Buttons % 8))), \
+ HID_RI_REPORT_SIZE(8, (Buttons % 8) ? (8 - (Buttons % 8)) : 0), \
HID_RI_REPORT_COUNT(8, 0x01), \
HID_RI_INPUT(8, HID_IOF_CONSTANT), \
HID_RI_END_COLLECTION(0)
HID_RI_REPORT_SIZE(8, 0x01), \
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), \
HID_RI_REPORT_COUNT(8, 0x01), \
- HID_RI_REPORT_SIZE(8, (8 - (Buttons % 8))), \
+ HID_RI_REPORT_SIZE(8, (Buttons % 8) ? (8 - (Buttons % 8)) : 0), \
HID_RI_INPUT(8, HID_IOF_CONSTANT), \
HID_RI_USAGE_PAGE(8, 0x01), \
HID_RI_USAGE(8, 0x30), \
{
USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */
- uint16_t HIDSpec; /**< BCD encoded version that the HID descriptor and device complies to. */
+ uint16_t HIDSpec; /**< BCD encoded version that the HID descriptor and device complies to.
+ *
+ * \see \ref VERSION_BCD() utility macro.
+ */
uint8_t CountryCode; /**< Country code of the localized device, or zero if universal. */
uint8_t TotalReportDescriptors; /**< Total number of HID report descriptors for the interface. */
* given by the specific class.
*/
- uint16_t bcdHID; /**< BCD encoded version that the HID descriptor and device complies to. */
+ uint16_t bcdHID; /**< BCD encoded version that the HID descriptor and device complies to.
+ *
+ * \see \ref VERSION_BCD() utility macro.
+ */
uint8_t bCountryCode; /**< Country code of the localized device, or zero if universal. */
uint8_t bNumDescriptors; /**< Total number of HID report descriptors for the interface. */