Changeset 132ab5d1 in mainline for uspace/lib/usbhid/src/hiddescriptor.c
- Timestamp:
- 2018-01-30T03:20:45Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5a6cc679
- Parents:
- 8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hiddescriptor.c
r8bfb163 r132ab5d1 36 36 #include <errno.h> 37 37 #include <stdio.h> 38 #include <malloc.h>39 38 #include <mem.h> 40 39 #include <usb/debug.h> 41 40 #include <assert.h> 41 #include <stdlib.h> 42 42 43 43 … … 75 75 #define USB_HID_RESET_OFFSET 3 76 76 77 #define USB_HID_INVALID -98 77 78 /** Unknown tag was founded in report descriptor data*/ 78 79 #define USB_HID_UNKNOWN_TAG -99 … … 103 104 104 105 if(usb_hid_report_compare_usage_path(path, cmp_path, 105 USB_HID_PATH_COMPARE_STRICT) == EOK){106 USB_HID_PATH_COMPARE_STRICT) == 0){ 106 107 break; 107 108 } … … 539 540 540 541 if((ret=usb_hid_report_parse_main_tag(tag, data, item_size, 541 report_item, usage_path)) == EOK) {542 report_item, usage_path)) == 0) { 542 543 543 544 return USB_HID_NEW_REPORT_ITEM; … … 570 571 * @param Length of data buffer 571 572 * @param Current state table 572 * @return Errorcode573 * @return 0 or USB_HID_ code 573 574 */ 574 575 … … 585 586 case USB_HID_REPORT_TAG_FEATURE: 586 587 report_item->item_flags = *data; 587 return EOK;588 return 0; 588 589 break; 589 590 … … 625 626 } 626 627 627 return EOK;628 return 0; 628 629 } 629 630 … … 635 636 * @param Length of data buffer 636 637 * @param Current state table 637 * @return Errorcode638 * @return 0 or USB_HID_ code 638 639 */ 639 640 int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, … … 711 712 } 712 713 713 return EOK;714 return 0; 714 715 } 715 716 … … 721 722 * @param Length of data buffer 722 723 * @param Current state table 723 * @return Errorcode724 * @return 0 or USB_HID_ code 724 725 */ 725 726 int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, … … 777 778 USB_HID_EXTENDED_USAGE_PAGE( 778 779 usb_hid_report_tag_data_uint32(data, item_size))) { 779 return EINVAL;780 return USB_HID_INVALID; 780 781 } 781 782 … … 848 849 } 849 850 850 return EOK;851 return 0; 851 852 } 852 853
Note:
See TracChangeset
for help on using the changeset viewer.