Ignore:
Timestamp:
2011-05-12T09:16:30Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
97cb542
Parents:
9e195e2c (diff), 9be8669 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged changes to HID parser from maklf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/multimedia/multimedia.c

    r9e195e2c rd59d0bb  
    252252        usb_hid_report_path_set_report_id(path, 1);
    253253       
    254         multim_dev->key_count = usb_hid_report_input_length(
    255             hid_dev->report, path,
    256             USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
     254        multim_dev->key_count = usb_hid_report_size(
     255            hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT);
     256
    257257        usb_hid_report_path_free(path);
    258258       
     
    347347            USB_HID_REPORT_TYPE_INPUT);
    348348       
    349         unsigned int key;
     349//      unsigned int key;
    350350       
    351351        /*! @todo Is this iterating OK if done multiple times?
     
    353353         */
    354354        while (field != NULL) {
    355                 usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value,
    356                     field->usage);
    357                
    358                 key = usb_multimedia_map_usage(field->usage);
    359                 const char *key_str = usb_multimedia_usage_to_str(field->usage);
    360                 usb_log_info("Pressed key: %s\n", key_str);
    361                 usb_multimedia_push_ev(hid_dev, KEY_PRESS, key);
     355                if(field->value != 0) {
     356                        usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value,
     357                            field->usage);
     358                        key = usb_multimedia_map_usage(field->usage);
     359                        const char *key_str =
     360                            usb_multimedia_usage_to_str(field->usage);
     361                        usb_log_info("Pressed key: %s\n", key_str);
     362                        usb_multimedia_push_ev(hid_dev, KEY_PRESS, key);
     363                }
    362364               
    363365                field = usb_hid_report_get_sibling(
Note: See TracChangeset for help on using the changeset viewer.