add extra comma to HID_REPORT_ID

this make the template with Report ID look less weird to the user
This commit is contained in:
hathach 2020-04-20 16:09:17 +07:00
parent f9262007ac
commit d57312602d
3 changed files with 8 additions and 8 deletions

View File

@ -73,8 +73,8 @@ uint8_t const * tud_descriptor_device_cb(void)
uint8_t const desc_hid_report[] = uint8_t const desc_hid_report[] =
{ {
TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(REPORT_ID_KEYBOARD), ), TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(REPORT_ID_KEYBOARD) ),
TUD_HID_REPORT_DESC_MOUSE ( HID_REPORT_ID(REPORT_ID_MOUSE), ) TUD_HID_REPORT_DESC_MOUSE ( HID_REPORT_ID(REPORT_ID_MOUSE) )
}; };
// Invoked when received GET HID REPORT DESCRIPTOR // Invoked when received GET HID REPORT DESCRIPTOR

View File

@ -413,8 +413,8 @@ enum {
#define HID_REPORT_SIZE(x) HID_REPORT_ITEM(x, 7, RI_TYPE_GLOBAL, 1) #define HID_REPORT_SIZE(x) HID_REPORT_ITEM(x, 7, RI_TYPE_GLOBAL, 1)
#define HID_REPORT_SIZE_N(x, n) HID_REPORT_ITEM(x, 7, RI_TYPE_GLOBAL, n) #define HID_REPORT_SIZE_N(x, n) HID_REPORT_ITEM(x, 7, RI_TYPE_GLOBAL, n)
#define HID_REPORT_ID(x) HID_REPORT_ITEM(x, 8, RI_TYPE_GLOBAL, 1) #define HID_REPORT_ID(x) HID_REPORT_ITEM(x, 8, RI_TYPE_GLOBAL, 1),
#define HID_REPORT_ID_N(x) HID_REPORT_ITEM(x, 8, RI_TYPE_GLOBAL, n) #define HID_REPORT_ID_N(x) HID_REPORT_ITEM(x, 8, RI_TYPE_GLOBAL, n),
#define HID_REPORT_COUNT(x) HID_REPORT_ITEM(x, 9, RI_TYPE_GLOBAL, 1) #define HID_REPORT_COUNT(x) HID_REPORT_ITEM(x, 9, RI_TYPE_GLOBAL, 1)
#define HID_REPORT_COUNT_N(x, n) HID_REPORT_ITEM(x, 9, RI_TYPE_GLOBAL, n) #define HID_REPORT_COUNT_N(x, n) HID_REPORT_ITEM(x, 9, RI_TYPE_GLOBAL, n)

View File

@ -93,17 +93,17 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate);
* HID Report Descriptor Template * HID Report Descriptor Template
* *
* Convenient for declaring popular HID device (keyboard, mouse, consumer, * Convenient for declaring popular HID device (keyboard, mouse, consumer,
* gamepad etc...). Templates take "HID_REPORT_ID(n)," as input, leave * gamepad etc...). Templates take "HID_REPORT_ID(n)" as input, leave
* empty if multiple reports is not used * empty if multiple reports is not used
* *
* - Only 1 report: no parameter * - Only 1 report: no parameter
* uint8_t const report_desc[] = { TUD_HID_REPORT_DESC_KEYBOARD() }; * uint8_t const report_desc[] = { TUD_HID_REPORT_DESC_KEYBOARD() };
* *
* - Multiple Reports: "HID_REPORT_ID(ID)," must be passed to template * - Multiple Reports: "HID_REPORT_ID(ID)" must be passed to template
* uint8_t const report_desc[] = * uint8_t const report_desc[] =
* { * {
* TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(1), ) , * TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(1) ) ,
* TUD_HID_REPORT_DESC_MOUSE ( HID_REPORT_ID(2), ) * TUD_HID_REPORT_DESC_MOUSE ( HID_REPORT_ID(2) )
* }; * };
*--------------------------------------------------------------------*/ *--------------------------------------------------------------------*/