Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/hiddescriptor.c

    rb7fd2a0 r38d150e  
    7575#define USB_HID_RESET_OFFSET    3
    7676
    77 #define USB_HID_INVALID                 -98
    7877/** Unknown tag was founded in report descriptor data*/
    7978#define USB_HID_UNKNOWN_TAG             -99
     
    104103               
    105104                if(usb_hid_report_compare_usage_path(path, cmp_path,
    106                                         USB_HID_PATH_COMPARE_STRICT) == 0){
     105                                        USB_HID_PATH_COMPARE_STRICT) == EOK){
    107106                        break;
    108107                }
     
    134133 * @retval EOK If report structure was successfully initialized
    135134 */
    136 errno_t usb_hid_report_init(usb_hid_report_t *report)
     135int usb_hid_report_init(usb_hid_report_t *report)
    137136{
    138137        if (report == NULL) {
     
    162161 *
    163162 */
    164 errno_t usb_hid_report_append_fields(usb_hid_report_t *report,
     163int usb_hid_report_append_fields(usb_hid_report_t *report,
    165164                usb_hid_report_item_t *report_item) {
    166165
     
    356355 * @retval EOK If report descriptor is successfully parsed
    357356 */
    358 errno_t usb_hid_parse_report_descriptor(usb_hid_report_t *report,
     357int usb_hid_parse_report_descriptor(usb_hid_report_t *report,
    359358    const uint8_t *data, size_t size)
    360359{
     
    554553
    555554                if((ret=usb_hid_report_parse_main_tag(tag, data, item_size,
    556                         report_item, usage_path)) == 0) {
     555                        report_item, usage_path)) == EOK) {
    557556
    558557                        return USB_HID_NEW_REPORT_ITEM;
     
    585584 * @param Length of data buffer
    586585 * @param Current state table
    587  * @return 0 or USB_HID_ code
     586 * @return Error code
    588587 */
    589588
     
    600599        case USB_HID_REPORT_TAG_FEATURE:
    601600                report_item->item_flags = *data;                       
    602                 return 0;                       
     601                return EOK;                     
    603602                break;
    604603                       
     
    640639        }
    641640
    642         return 0;
     641        return EOK;
    643642}
    644643
     
    650649 * @param Length of data buffer
    651650 * @param Current state table
    652  * @return 0 or USB_HID_ code
     651 * @return Error code
    653652 */
    654653int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data,
     
    726725        }
    727726
    728         return 0;
     727        return EOK;
    729728}
    730729
     
    736735 * @param Length of data buffer
    737736 * @param Current state table
    738  * @return 0 or USB_HID_ code
     737 * @return Error code
    739738 */
    740739int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data,
     
    792791                            USB_HID_EXTENDED_USAGE_PAGE(
    793792                            usb_hid_report_tag_data_uint32(data, item_size))) {
    794                                 return USB_HID_INVALID;
     793                                return EINVAL;
    795794                        }
    796795                       
     
    863862        }
    864863       
    865         return 0;
     864        return EOK;
    866865}
    867866
Note: See TracChangeset for help on using the changeset viewer.