From 6e80562bf96aa853c30a473fc95a35425fe137db Mon Sep 17 00:00:00 2001 From: Matias N Date: Sat, 30 Mar 2019 10:48:41 -0600 Subject: [PATCH] include/nuttx/usb/hid.h: The usbhid_descriptor_s struct defined in hid.h included some optional fields that should not be hard-defined as part of that structure. An arbitrray number of optional entries could be included in the descriptor, but that is not properly represneted. No code on NuttX currently depends on the structure definition with an optional descriptor so it is safe to remove. --- include/nuttx/usb/hid.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/nuttx/usb/hid.h b/include/nuttx/usb/hid.h index 1e8d95a085..eb555a2e77 100644 --- a/include/nuttx/usb/hid.h +++ b/include/nuttx/usb/hid.h @@ -638,6 +638,15 @@ struct usbhid_descriptor_s uint8_t ndesc; /* Number of descriptors (>=1) */ uint8_t classdesc; /* Class descriptor type (See 7.1) */ uint8_t desclen[2]; /* Size of the report descriptor */ + /* Optional descriptors may follow */ +}; + +/* The HID descriptior is can be variable length. It may be include an + * arbitray number of optional descriptors. + */ + +struct usbhid_optdesc_s +{ uint8_t optdesc; /* Type of optional descriptor */ uint8_t optlen[2]; /* Size of the optional descriptor */ };