Oops - with new changes to the way the device Configuration Descriptor is retrieved...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / HIDParser.h
index 4acce24..942fe11 100644 (file)
 /** \ingroup Group_USB\r
  *  @defgroup Group_HIDParser HID Report Parser\r
  *\r
+ *  \section Sec_Dependencies Module Source Dependencies\r
+ *  The following files must be built with any user project that uses this module:\r
+ *    - LUFA/Drivers/USB/Class/Host/HIDParser.c\r
+ *\r
+ *  \section Module Description\r
  *  Functions, macros, variables, enums and types related to the parsing of HID class device report descriptors.\r
  *\r
  *  The processed HID report is presented back to the user application as a flat structure containing each report\r
                        typedef struct\r
                        {\r
                                uint8_t                      TotalReportItems; /**< Total number of report items stored in the\r
-                                                                               *   ReportItems array. */\r
-\r
+                                                                               *   ReportItems array.\r
+                                                                               */\r
                                HID_ReportItem_t             ReportItems[HID_MAX_REPORTITEMS]; /**< Report items array, including\r
-                                                                                           *   all IN, OUT and FEATURE items. */\r
-\r
+                                                                                           *   all IN, OUT and FEATURE items.\r
+                                                                                               */\r
                                HID_CollectionPath_t         CollectionPaths[HID_MAX_COLLECTIONS]; /**< All collection items, referenced\r
-                                                                                                   *   by the report items. */\r
+                                                                                                   *   by the report items.\r
+                                                                                                   */\r
+                               bool                         UsingMultipleReports; /**< Indicates if the device has at least one REPORT ID\r
+                                                                                   *   element in its HID report descriptor.\r
+                                                                                   */\r
                        } HID_ReportInfo_t;\r
                        \r
                /* Function Prototypes: */\r
                        /** Function to process a given HID report returned from an attached device, and store it into a given\r
                         *  \ref HID_ReportInfo_t structure.\r
                         *\r
-                        *  \param ReportData  Buffer containing the device's HID report table\r
-                        *  \param ReportSize  Size in bytes of the HID report table\r
-                        *  \param ParserData  Pointer to a \ref HID_ReportInfo_t instance for the parser output\r
+                        *  \param[in] ReportData  Buffer containing the device's HID report table\r
+                        *  \param[in] ReportSize  Size in bytes of the HID report table\r
+                        *  \param[out] ParserData  Pointer to a \ref HID_ReportInfo_t instance for the parser output\r
                         *\r
                         *  \return A value in the \ref HID_Parse_ErrorCodes_t enum\r
                         */\r
                        /** Extracts the given report item's value out of the given HID report and places it into the Value\r
                         *  member of the report item's \ref HID_ReportItem_t structure.\r
                         *\r
-                        *  \param ReportData  Buffer containing an IN or FEATURE report from an attached device\r
-                        *  \param ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array\r
+                        *  \param[in] ReportData  Buffer containing an IN or FEATURE report from an attached device\r
+                        *  \param[in,out] ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array\r
                         *\r
                         *  \returns Boolean true if the item to retrieve was located in the given report, false otherwise\r
                         */\r
                         *  buffer. The report buffer is assumed to have the appropriate bits cleared before calling\r
                         *  this function (i.e., the buffer should be explicitly cleared before report values are added).\r
                         *\r
-                        *  If the device has multiple HID reports, the report ID is set to the report ID of the given item.\r
+                        *  If the device has multiple HID reports, the first byte in the report is set to the report ID of the given item.\r
                         *\r
-                        *  \param ReportData  Buffer holding the current OUT report data\r
-                        *  \param ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array\r
+                        *  \param[out] ReportData  Buffer holding the current OUT or FEATURE report data\r
+                        *  \param[in] ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array\r
                         */\r
                        void USB_SetHIDReportItemInfo(uint8_t* ReportData, const HID_ReportItem_t* ReportItem)\r
                                                      ATTR_NON_NULL_PTR_ARG(1, 2);\r