From 2910b8d77a91e200d78fcc7e5ba1821e1505fed1 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 30 Jul 2018 15:49:16 +0700 Subject: [PATCH] clean up --- src/device/usbd_desc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/device/usbd_desc.c b/src/device/usbd_desc.c index 8f147aa67..df88d30bd 100644 --- a/src/device/usbd_desc.c +++ b/src/device/usbd_desc.c @@ -118,7 +118,7 @@ //--------------------------------------------------------------------+ -/*------------- Keyboard Descriptor -------------*/ +/*------------- Keyboard Descriptor Template -------------*/ #define HID_REPORT_KEYBOARD(...) \ HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ HID_USAGE ( HID_USAGE_DESKTOP_KEYBOARD ) ,\ @@ -159,7 +159,7 @@ HID_OUTPUT ( HID_CONSTANT ) ,\ HID_COLLECTION_END \ -/*------------- Mouse Descriptor -------------*/ +/*------------- Mouse Descriptor Template -------------*/ #define HID_REPORT_MOUSE(...) \ HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ HID_USAGE ( HID_USAGE_DESKTOP_MOUSE ) ,\ @@ -200,7 +200,7 @@ HID_COLLECTION_END \ -/*------------- Generic (composite) Descriptor -------------*/ +/*------------- Boot Protocol Report Descriptor -------------*/ #if CFG_TUD_HID_KEYBOARD && CFG_TUD_HID_KEYBOARD_BOOT uint8_t const _desc_auto_hid_boot_kbd_report[] = { HID_REPORT_KEYBOARD() }; #endif @@ -209,8 +209,14 @@ uint8_t const _desc_auto_hid_boot_kbd_report[] = { HID_REPORT_KEYBOARD() }; uint8_t const _desc_auto_hid_boot_mse_report[] = { HID_REPORT_MOUSE() }; #endif + +/*------------- Generic (composite) Descriptor -------------*/ #if TUD_OPT_HID_GENERIC +// Report ID: 0 if there is only 1 report +// starting from 1 if there is multiple reports +#define _REPORT_ID_KBD + // TODO report ID uint8_t const _desc_auto_hid_generic_report[] = {