Changeset 0bd4810c in mainline
- Timestamp:
- 2011-03-11T16:24:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 33382a9
- Parents:
- 9d9ffdd
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hidparser.h
r9d9ffdd r0bd4810c 64 64 65 65 /** 66 * Description of path of usage pages and usages in report descriptor 67 */ 68 typedef struct { 69 int32_t usage_page; 70 } usb_hid_report_path_t; 71 72 /** 66 73 * Description of report items 67 74 */ … … 185 192 const usb_hid_report_in_callbacks_t *callbacks, void *arg); 186 193 194 int usb_hid_report_input_length(const usb_hid_report_parser_t *parser, 195 const usb_hid_report_path_t *path); 196 187 197 188 198 void usb_hid_free_report_parser(usb_hid_report_parser_t *parser); -
uspace/lib/usb/src/hidparser.c
r9d9ffdd r0bd4810c 719 719 720 720 } 721 722 int usb_hid_report_input_length(const usb_hid_report_parser_t *parser, 723 const usb_hid_report_path_t *path) 724 { 725 int ret = 0; 726 link_t *item; 727 usb_hid_report_item_t *report_item; 728 729 item = (&parser->input)->next; 730 while(&parser->input != item) { 731 report_item = list_get_instance(item, usb_hid_report_item_t, link); 732 if(report_item->usage_page == path->usage_page) { 733 ret += report_item->count; 734 } 735 736 item = item->next; 737 } 738 739 return ret; 740 } 741 742 743 721 744 /** 722 745 * @}
Note:
See TracChangeset
for help on using the changeset viewer.