Changeset 3a6e423 in mainline for uspace/drv/usbhid/kbd/kbddev.c


Ignore:
Timestamp:
2011-05-08T19:38:24Z (13 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7aaf403e
Parents:
7b6f116
Message:

Parsing of usages in case of array items repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/kbd/kbddev.c

    r7b6f116 r3a6e423  
    313313        usb_hid_report_field_t *field = usb_hid_report_get_sibling(
    314314            hid_dev->report, NULL, kbd_dev->led_path,
    315             USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY | USB_HID_PATH_COMPARE_END,
     315            USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
    316316            USB_HID_REPORT_TYPE_OUTPUT);
    317317       
    318         while (field != NULL) {
    319 
     318        while (field != NULL) {         
     319               
    320320                if ((field->usage == USB_HID_LED_NUM_LOCK)
    321321                    && (kbd_dev->mods & KM_NUM_LOCK)){
     
    334334               
    335335                field = usb_hid_report_get_sibling(hid_dev->report, field,
    336                     kbd_dev->led_path, USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY
    337                     | USB_HID_PATH_COMPARE_END, USB_HID_REPORT_TYPE_OUTPUT);
     336                    kbd_dev->led_path, 
     337                USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
     338                        USB_HID_REPORT_TYPE_OUTPUT);
    338339        }
    339340       
     
    865866        usb_hid_report_path_set_report_id(path, 0);
    866867       
    867         kbd_dev->key_count = usb_hid_report_input_length(
    868             hid_dev->report, path,
    869             USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
     868        kbd_dev->key_count = usb_hid_report_size(
     869            hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT);
    870870        usb_hid_report_path_free(path);
    871871       
     
    908908            kbd_dev->led_path, USB_HIDUT_PAGE_LED, 0);
    909909       
    910         kbd_dev->led_output_size = usb_hid_report_output_size(hid_dev->report,
    911             kbd_dev->led_path,
    912             USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
     910        kbd_dev->led_output_size = usb_hid_report_size(hid_dev->report,
     911            0, USB_HID_REPORT_TYPE_OUTPUT);
    913912       
    914913        usb_log_debug("Output report size (in items): %zu\n",
Note: See TracChangeset for help on using the changeset viewer.