Changeset b9d7965 in mainline for uspace/lib/usb/src/hiddescriptor.c


Ignore:
Timestamp:
2011-05-06T07:45:35Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
acdbd780
Parents:
1519b91
Message:

#209 - correct usage paths for decomposed items, bug fix

File:
1 edited

Legend:

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

    r1519b91 rb9d7965  
    5656#define USB_HID_UNKNOWN_TAG             -99
    5757
    58 void usb_hid_report_path_try_insert(usb_hid_report_t *report, usb_hid_report_path_t *cmp_path)
     58usb_hid_report_path_t *usb_hid_report_path_try_insert(usb_hid_report_t *report, usb_hid_report_path_t *cmp_path)
    5959{
    6060        /* find or append current collection path to the list */
     
    7373                list_append(&path->link, &report->collection_paths);                                   
    7474                report->collection_paths_count++;
     75
     76                return path;
     77        }
     78        else {
     79                return list_get_instance(path_it, usb_hid_report_path_t, link);
    7580        }
    7681}
     
    113118
    114119                /* fill the attributes */               
    115                 field->collection_path = path;
    116120                field->logical_minimum = report_item->logical_minimum;
    117121                field->logical_maximum = report_item->logical_maximum;
     
    172176                usb_hid_report_set_last_item(path, USB_HID_TAG_CLASS_LOCAL, field->usage);
    173177
    174                 usb_hid_report_path_try_insert(report, path);
     178                field->collection_path = usb_hid_report_path_try_insert(report, path);
    175179
    176180                field->size = report_item->size;
     
    647651                usb_log_debug("\t\ttUSAGE: %X\n", report_item->usage);
    648652                usb_log_debug("\t\tUSAGE PAGE: %X\n", report_item->usage_page);
    649                                                
    650 //              usb_log_debug("\n");           
     653               
     654                //usb_hid_print_usage_path(report_item->collection_path);
     655
     656                usb_log_debug("\n");           
    651657
    652658        }
Note: See TracChangeset for help on using the changeset viewer.