Changeset 3ca4ae9 in mainline
- Timestamp:
- 2017-12-20T15:51:07Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4547f11
- Parents:
- 68a2fab2
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 15:46:56)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 15:51:07)
- Location:
- uspace/lib/usbhid/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hiddescriptor.c
r68a2fab2 r3ca4ae9 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 } … … 553 554 554 555 if((ret=usb_hid_report_parse_main_tag(tag, data, item_size, 555 report_item, usage_path)) == EOK) {556 report_item, usage_path)) == 0) { 556 557 557 558 return USB_HID_NEW_REPORT_ITEM; … … 584 585 * @param Length of data buffer 585 586 * @param Current state table 586 * @return Errorcode587 * @return 0 or USB_HID_ code 587 588 */ 588 589 … … 599 600 case USB_HID_REPORT_TAG_FEATURE: 600 601 report_item->item_flags = *data; 601 return EOK;602 return 0; 602 603 break; 603 604 … … 639 640 } 640 641 641 return EOK;642 return 0; 642 643 } 643 644 … … 649 650 * @param Length of data buffer 650 651 * @param Current state table 651 * @return Errorcode652 * @return 0 or USB_HID_ code 652 653 */ 653 654 int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, … … 725 726 } 726 727 727 return EOK;728 return 0; 728 729 } 729 730 … … 735 736 * @param Length of data buffer 736 737 * @param Current state table 737 * @return Errorcode738 * @return 0 or USB_HID_ code 738 739 */ 739 740 int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, … … 791 792 USB_HID_EXTENDED_USAGE_PAGE( 792 793 usb_hid_report_tag_data_uint32(data, item_size))) { 793 return EINVAL;794 return USB_HID_INVALID; 794 795 } 795 796 … … 862 863 } 863 864 864 return EOK;865 return 0; 865 866 } 866 867 -
uspace/lib/usbhid/src/hidparser.c
r68a2fab2 r3ca4ae9 531 531 532 532 if (usb_hid_report_compare_usage_path( 533 field->collection_path, path, flags) == EOK) {533 field->collection_path, path, flags) == 0) { 534 534 usb_hid_report_remove_last_item( 535 535 field->collection_path); -
uspace/lib/usbhid/src/hidpath.c
r68a2fab2 r3ca4ae9 191 191 * @param flags Flags determining the mode of comparison 192 192 * 193 * @return EOKif both paths are identical, non zero number otherwise193 * @return 0 if both paths are identical, non zero number otherwise 194 194 * 195 195 */ … … 213 213 // Empty path match all others 214 214 if (path->depth == 0) { 215 return EOK;215 return 0; 216 216 } 217 217 … … 239 239 if (USB_HID_SAME_USAGE(report_item->usage, 240 240 path_item->usage)) 241 return EOK;241 return 0; 242 242 } else { 243 return EOK;243 return 0; 244 244 } 245 245 } … … 285 285 ((report_link == &report_path->items.head) && 286 286 (path_link == &path->items.head))) { 287 return EOK;287 return 0; 288 288 } else { 289 289 return 1; … … 297 297 298 298 if (list_empty(&path->items)) { 299 return EOK;299 return 0; 300 300 } 301 301 … … 320 320 321 321 if (path_link == &path->items.head) { 322 return EOK;322 return 0; 323 323 } else { 324 324 return 1; … … 327 327 328 328 default: 329 return EINVAL;329 return -1; 330 330 } 331 331 }
Note:
See TracChangeset
for help on using the changeset viewer.