| LUFA Library 140302 |

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
HIDParser.h File Reference

USB Human Interface Device (HID) Class report descriptor parser. More...

`#include "../../../../Common/Common.h"`
`#include "HIDReportData.h"`
`#include "HIDClassCommon.h"`

## Data Structures
struct | HID_CollectionPath_t
| HID Parser Report Item Collection Path Structure. More...
struct | HID_MinMax_t
| HID Parser Report Item Min/Max Structure. More...
struct | HID_ReportInfo_t
| HID Parser State Structure. More...
struct | HID_ReportItem_Attributes_t
| HID Parser Report Item Attributes Structure. More...
struct | HID_ReportItem_t
| HID Parser Report Item Details Structure. More...
struct | HID_ReportSizeInfo_t
| HID Parser Report Size Structure. More...
struct | HID_Unit_t
| HID Parser Report Item Unit Structure. More...
struct | HID_Usage_t
| HID Parser Report Item Usage Structure. More...

## Macros
#define | HID_ALIGN_DATA(ReportItem, Type) ((Type)(ReportItem->Value << ((8 * sizeof(Type)) - ReportItem->Attributes.BitSize)))
#define | HID_MAX_COLLECTIONS 10
#define | HID_MAX_REPORT_IDS 10
#define | HID_MAX_REPORTITEMS 20
#define | HID_STATETABLE_STACK_DEPTH 2
#define | HID_USAGE_STACK_DEPTH 8

## Enumerations
enum | HID_Parse_ErrorCodes_t { HID_PARSE_Successful = 0, HID_PARSE_HIDStackOverflow = 1, HID_PARSE_HIDStackUnderflow = 2, HID_PARSE_InsufficientReportItems = 3, HID_PARSE_UnexpectedEndCollection = 4, HID_PARSE_InsufficientCollectionPaths = 5, HID_PARSE_UsageListOverflow = 6, HID_PARSE_InsufficientReportIDItems = 7, HID_PARSE_NoUnfilteredReportItems = 8 }

## Functions
bool | CALLBACK_HIDParser_FilterHIDReportItem (HID_ReportItem_t *const CurrentItem)
bool | USB_GetHIDReportItemInfo (const uint8_t *ReportData, HID_ReportItem_t *const ReportItem) ATTR_NON_NULL_PTR_ARG(1)
uint16_t | USB_GetHIDReportSize (HID_ReportInfo_t *const ParserData, const uint8_t ReportID, const uint8_t ReportType) ATTR_CONST ATTR_NON_NULL_PTR_ARG(1)
uint8_t | USB_ProcessHIDReport (const uint8_t *ReportData, uint16_t ReportSize, HID_ReportInfo_t *const ParserData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3)
void | USB_SetHIDReportItemInfo (uint8_t *ReportData, HID_ReportItem_t *const ReportItem) ATTR_NON_NULL_PTR_ARG(1)

## Detailed Description

This file allows for the easy parsing of complex HID report descriptors, which describes the data that a HID device transmits to the host. It also provides an easy API for extracting and processing the data elements inside a HID report sent from an attached HID device.