Changes in uspace/lib/usbhid/src/hiddescriptor.c [b7fd2a0:38d150e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hiddescriptor.c
rb7fd2a0 r38d150e 75 75 #define USB_HID_RESET_OFFSET 3 76 76 77 #define USB_HID_INVALID -9878 77 /** Unknown tag was founded in report descriptor data*/ 79 78 #define USB_HID_UNKNOWN_TAG -99 … … 104 103 105 104 if(usb_hid_report_compare_usage_path(path, cmp_path, 106 USB_HID_PATH_COMPARE_STRICT) == 0){105 USB_HID_PATH_COMPARE_STRICT) == EOK){ 107 106 break; 108 107 } … … 134 133 * @retval EOK If report structure was successfully initialized 135 134 */ 136 errno_t usb_hid_report_init(usb_hid_report_t *report)135 int usb_hid_report_init(usb_hid_report_t *report) 137 136 { 138 137 if (report == NULL) { … … 162 161 * 163 162 */ 164 errno_t usb_hid_report_append_fields(usb_hid_report_t *report,163 int usb_hid_report_append_fields(usb_hid_report_t *report, 165 164 usb_hid_report_item_t *report_item) { 166 165 … … 356 355 * @retval EOK If report descriptor is successfully parsed 357 356 */ 358 errno_t usb_hid_parse_report_descriptor(usb_hid_report_t *report,357 int usb_hid_parse_report_descriptor(usb_hid_report_t *report, 359 358 const uint8_t *data, size_t size) 360 359 { … … 554 553 555 554 if((ret=usb_hid_report_parse_main_tag(tag, data, item_size, 556 report_item, usage_path)) == 0) {555 report_item, usage_path)) == EOK) { 557 556 558 557 return USB_HID_NEW_REPORT_ITEM; … … 585 584 * @param Length of data buffer 586 585 * @param Current state table 587 * @return 0 or USB_HID_code586 * @return Error code 588 587 */ 589 588 … … 600 599 case USB_HID_REPORT_TAG_FEATURE: 601 600 report_item->item_flags = *data; 602 return 0;601 return EOK; 603 602 break; 604 603 … … 640 639 } 641 640 642 return 0;641 return EOK; 643 642 } 644 643 … … 650 649 * @param Length of data buffer 651 650 * @param Current state table 652 * @return 0 or USB_HID_code651 * @return Error code 653 652 */ 654 653 int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, … … 726 725 } 727 726 728 return 0;727 return EOK; 729 728 } 730 729 … … 736 735 * @param Length of data buffer 737 736 * @param Current state table 738 * @return 0 or USB_HID_code737 * @return Error code 739 738 */ 740 739 int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, … … 792 791 USB_HID_EXTENDED_USAGE_PAGE( 793 792 usb_hid_report_tag_data_uint32(data, item_size))) { 794 return USB_HID_INVALID;793 return EINVAL; 795 794 } 796 795 … … 863 862 } 864 863 865 return 0;864 return EOK; 866 865 } 867 866
Note:
See TracChangeset
for help on using the changeset viewer.