summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_host.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-05-22 20:54:59 +0700
committerhathach <[email protected]>2021-05-22 20:54:59 +0700
commitad845db6a50c1d90e4f7cc45ca16a8861ee2da4d (patch)
tree2dee237f3db7913c75f2b234f52b0be7394b1613 /src/class/hid/hid_host.h
parent350dfb2ea37cebc59ef9fd6b63d2aae1b8cb48da (diff)
improve hid parser
Diffstat (limited to 'src/class/hid/hid_host.h')
-rw-r--r--src/class/hid/hid_host.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/class/hid/hid_host.h b/src/class/hid/hid_host.h
index 3cf8dc70f..1b8acda05 100644
--- a/src/class/hid/hid_host.h
+++ b/src/class/hid/hid_host.h
@@ -53,8 +53,9 @@
typedef struct
{
+ uint8_t report_id;
+ uint8_t usage;
uint16_t usage_page;
- uint8_t usage;
// TODO still use the endpoint size for now
// uint8_t in_len; // length of IN report
@@ -83,9 +84,8 @@ bool tuh_hid_get_protocol(uint8_t dev_addr, uint8_t instance);
bool tuh_hid_set_protocol(uint8_t dev_addr, uint8_t instance, uint8_t protocol);
// Parse report descriptor into array of report_info struct and return number of reports.
-// If return 0, this is a ingle report, otherwise it is composite report with 1st byte as ID.
// For complicated report, application should write its own parser.
-uint8_t tuh_hid_parse_report_descriptor(tuh_hid_report_info_t* report_info, uint8_t arr_count, uint8_t const* desc_report, uint16_t desc_len) TU_ATTR_UNUSED;
+uint8_t tuh_hid_parse_report_descriptor(tuh_hid_report_info_t* reports_info_arr, uint8_t arr_count, uint8_t const* desc_report, uint16_t desc_len) TU_ATTR_UNUSED;
// Check if the interface is ready to use
//bool tuh_n_hid_n_ready(uint8_t dev_addr, uint8_t instance);