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/lgtch-ultrax/lgtch-ultrax.c

    r7b6f116 r3a6e423  
    300300        usb_hid_report_path_set_report_id(path, 1);
    301301       
    302         lgtch_dev->key_count = usb_hid_report_input_length(
    303             hid_dev->report, path,
    304             USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
     302        lgtch_dev->key_count = usb_hid_report_size(
     303            hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT);
    305304        usb_hid_report_path_free(path);
    306305       
     
    400399            USB_HID_REPORT_TYPE_INPUT);
    401400       
    402         unsigned int key;
     401//      unsigned int key;
    403402       
    404403        /*! @todo Is this iterating OK if done multiple times?
     
    406405         */
    407406        while (field != NULL) {
    408                 usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value,
    409                     field->usage);
     407                if(field->value != 0) {
     408                        usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value,
     409                            field->usage);
    410410               
    411                 key = usb_lgtch_map_usage(field->usage);
    412                 usb_lgtch_push_ev(hid_dev, KEY_PRESS, key);
     411                        //key = usb_lgtch_map_usage(field->usage);
     412                        usb_lgtch_push_ev(hid_dev, KEY_PRESS, field->usage);
     413                }
    413414               
    414415                field = usb_hid_report_get_sibling(
Note: See TracChangeset for help on using the changeset viewer.