Change HID report parser so that it can calculate and record the sizes (IN, OUT and FEATURE) of each report within the device, by report ID. This will be required in host mode, so that the host can determine how many bytes of data must be read in for each report.

Add to MouseHostWithParser and KeyboardHostWithParser demos to print out the report sizes when a valid device is connected.
This commit is contained in:
Dean Camera 2009-09-09 08:34:24 +00:00
parent 331929833d
commit 524decdeb3
6 changed files with 103 additions and 21 deletions

View file

@ -39,6 +39,7 @@
* - The Benito Programmer project now has its own unique VID/PID pair allocated from the Atmel donated LUFA VID/PID pool
* - Add in new invalid event hook check targets to project makefiles to produce compilation errors when invalid event names
* are used in a project
* - The HID Report Parser now gives information on the total length of each report within a HID interface
*
* <b>Fixed:</b>
* - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the

View file

@ -51,6 +51,13 @@
* If a item has a multiple count (i.e. a REPORT COUNT of more than 1), each item in the report count is placed separately in the
* processed HID report table. If not defined, this defaults to the value indicated in the HID.h file documentation.
*
* <b>HID_MAX_REPORT_IDS</b> - ( \ref Group_HIDParser ) \n
* HID reports may contain several report IDs, to logically distinguish grouped device data from one another - for example, a combination
* keyboard and mouse might use report IDs to seperate the keyboard reports from the mouse reports. In order to determine the size of each
* report, and thus know how many bytes must be read or written, the size of each report (IN, OUT and FEATURE) must be calculated and
* stored. This token may be defined to a non-zero 8-bit value to set the maximum number of report IDs in a device which can be processed
* and their sizes calculated/stored into the resultant processed report structure. If not defined, this defaults to the value indicated in
* the HID.h file documentation.
*
* \section Sec_SummaryUSBTokens USB Driver Related Tokens
* This section describes compile tokens which affect USB driver stack as a whole in the LUFA library.