Ignore:
File:
1 edited

Legend:

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

    r38d150e rb7fd2a0  
    7575#define USB_HID_RESET_OFFSET    3
    7676
     77#define USB_HID_INVALID                 -98
    7778/** Unknown tag was founded in report descriptor data*/
    7879#define USB_HID_UNKNOWN_TAG             -99
     
    103104               
    104105                if(usb_hid_report_compare_usage_path(path, cmp_path,
    105                                         USB_HID_PATH_COMPARE_STRICT) == EOK){
     106                                        USB_HID_PATH_COMPARE_STRICT) == 0){
    106107                        break;
    107108                }
     
    133134 * @retval EOK If report structure was successfully initialized
    134135 */
    135 int usb_hid_report_init(usb_hid_report_t *report)
     136errno_t usb_hid_report_init(usb_hid_report_t *report)
    136137{
    137138        if (report == NULL) {
     
    161162 *
    162163 */
    163 int usb_hid_report_append_fields(usb_hid_report_t *report,
     164errno_t usb_hid_report_append_fields(usb_hid_report_t *report,
    164165                usb_hid_report_item_t *report_item) {
    165166
     
    355356 * @retval EOK If report descriptor is successfully parsed
    356357 */
    357 int usb_hid_parse_report_descriptor(usb_hid_report_t *report,
     358errno_t usb_hid_parse_report_descriptor(usb_hid_report_t *report,
    358359    const uint8_t *data, size_t size)
    359360{
     
    553554
    554555                if((ret=usb_hid_report_parse_main_tag(tag, data, item_size,
    555                         report_item, usage_path)) == EOK) {
     556                        report_item, usage_path)) == 0) {
    556557
    557558                        return USB_HID_NEW_REPORT_ITEM;
     
    584585 * @param Length of data buffer
    585586 * @param Current state table
    586  * @return Error code
     587 * @return 0 or USB_HID_ code
    587588 */
    588589
     
    599600        case USB_HID_REPORT_TAG_FEATURE:
    600601                report_item->item_flags = *data;                       
    601                 return EOK;                     
     602                return 0;                       
    602603                break;
    603604                       
     
    639640        }
    640641
    641         return EOK;
     642        return 0;
    642643}
    643644
     
    649650 * @param Length of data buffer
    650651 * @param Current state table
    651  * @return Error code
     652 * @return 0 or USB_HID_ code
    652653 */
    653654int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data,
     
    725726        }
    726727
    727         return EOK;
     728        return 0;
    728729}
    729730
     
    735736 * @param Length of data buffer
    736737 * @param Current state table
    737  * @return Error code
     738 * @return 0 or USB_HID_ code
    738739 */
    739740int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data,
     
    791792                            USB_HID_EXTENDED_USAGE_PAGE(
    792793                            usb_hid_report_tag_data_uint32(data, item_size))) {
    793                                 return EINVAL;
     794                                return USB_HID_INVALID;
    794795                        }
    795796                       
     
    862863        }
    863864       
    864         return EOK;
     865        return 0;
    865866}
    866867
Note: See TracChangeset for help on using the changeset viewer.