Changeset 33382a9 in mainline
- Timestamp:
- 2011-03-11T16:56:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c32688d
- Parents:
- 0bd4810c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/hidparser.c
r0bd4810c r33382a9 607 607 608 608 // get the size of result keycodes array 609 list_item = parser->input.next; 610 while(list_item != &(parser->input)) { 611 612 item = list_get_instance(list_item, usb_hid_report_item_t, link); 613 if(item->usage_page == BAD_HACK_USAGE_PAGE) { 614 key_count += item->count; 615 } 616 617 list_item = list_item->next; 618 } 619 620 609 usb_hid_report_path_t path; 610 path.usage_page = BAD_HACK_USAGE_PAGE; 611 key_count = usb_hid_report_input_length(parser, &path); 612 621 613 if(!(keys = malloc(sizeof(uint8_t) * key_count))){ 622 614 return ENOMEM; … … 628 620 629 621 item = list_get_instance(list_item, usb_hid_report_item_t, link); 630 if(item->usage_page == BAD_HACK_USAGE_PAGE) { 622 if(!USB_HID_ITEM_FLAG_CONSTANT(item->item_flags) && 623 (item->usage_page == BAD_HACK_USAGE_PAGE)) { 631 624 for(j=0; j<(size_t)(item->count); j++) { 632 625 keys[i++] = usb_hid_translate_data(item, data,j); … … 730 723 while(&parser->input != item) { 731 724 report_item = list_get_instance(item, usb_hid_report_item_t, link); 732 if(report_item->usage_page == path->usage_page) { 725 if(!USB_HID_ITEM_FLAG_CONSTANT(report_item->item_flags) && 726 (report_item->usage_page == path->usage_page)) { 733 727 ret += report_item->count; 734 728 }
Note:
See TracChangeset
for help on using the changeset viewer.