#include <usb/hid/hidparser.h>
#include <errno.h>
#include <stdio.h>
#include <malloc.h>
#include <mem.h>
#include <usb/debug.h>
#include <assert.h>
Go to the source code of this file.
Defines | |
#define | INSIDE_DELIMITER_SET 2 |
Parser is in the set of local items. | |
#define | OUTSIDE_DELIMITER_SET 0 |
Second delimiter tag was read. | |
#define | START_DELIMITER_SET 1 |
First delimiter tag was read. | |
#define | USB_HID_NEW_REPORT_ITEM 1 |
The new report item flag. | |
#define | USB_HID_NO_ACTION 2 |
No special action after the report descriptor tag is processed should be done. | |
#define | USB_HID_RESET_OFFSET 3 |
#define | USB_HID_UNKNOWN_TAG -99 |
Unknown tag was founded in report descriptor data. | |
Functions | |
void | usb_hid_descriptor_print (usb_hid_report_t *report) |
Prints content of given report descriptor in human readable format. | |
void | usb_hid_descriptor_print_list (link_t *head) |
Prints content of given list of report items. | |
void | usb_hid_free_report (usb_hid_report_t *report) |
Frees the HID report descriptor parser structure. | |
void | usb_hid_free_report_list (link_t *head) |
Releases whole linked list of report items. | |
int | usb_hid_parse_report_descriptor (usb_hid_report_t *report, const uint8_t *data, size_t size) |
Parse HID report descriptor. | |
int | usb_hid_report_append_fields (usb_hid_report_t *report, usb_hid_report_item_t *report_item) |
usb_hid_report_description_t * | usb_hid_report_find_description (const usb_hid_report_t *report, uint8_t report_id, usb_hid_report_type_t type) |
Finds description of report with given report_id and of given type in opaque report structure. | |
int | usb_hid_report_init (usb_hid_report_t *report) |
Initialize the report descriptor parser structure. | |
int | usb_hid_report_parse_global_tag (uint8_t tag, const uint8_t *data, size_t item_size, usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path) |
Parse global tags of report descriptor. | |
int | usb_hid_report_parse_local_tag (uint8_t tag, const uint8_t *data, size_t item_size, usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path) |
Parse local tags of report descriptor. | |
int | usb_hid_report_parse_main_tag (uint8_t tag, const uint8_t *data, size_t item_size, usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path) |
Parse main tags of report descriptor. | |
int | usb_hid_report_parse_tag (uint8_t tag, uint8_t class, const uint8_t *data, size_t item_size, usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path) |
Parse one tag of the report descriptor. | |
usb_hid_report_path_t * | usb_hid_report_path_try_insert (usb_hid_report_t *report, usb_hid_report_path_t *cmp_path) |
Checks if given collection path is already present in report structure and inserts it if not. | |
uint32_t | usb_hid_report_tag_data_uint32 (const uint8_t *data, size_t size) |
Converts raw data to uint32 (thats the maximum length of short item data). |
Definition in file hiddescriptor.c.