Changeset b9e3aa3 in mainline for uspace/drv/usbhid


Ignore:
Timestamp:
2011-05-30T14:13:53Z (15 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3f9733
Parents:
2002595 (diff), 8357fc9 (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:

Development changes (a lot of stuff)

Location:
uspace/drv/usbhid
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/generic/hiddev.c

    r2002595 rb9e3aa3  
    9999        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    100100       
    101         usb_log_debug2("hid_dev: %p, Max input report size (%d).\n",
     101        usb_log_debug2("hid_dev: %p, Max input report size (%zu).\n",
    102102            hid_dev, hid_dev->max_input_report_size);
    103103       
     
    226226        }
    227227       
    228         usb_log_debug("HID function created. Handle: %d\n", fun->handle);
     228        usb_log_debug("HID function created. Handle: %" PRIun "\n", fun->handle);
    229229       
    230230        return EOK;
  • uspace/drv/usbhid/kbd/kbddev.c

    r2002595 rb9e3aa3  
    798798        }
    799799       
    800         usb_log_debug("%s function created. Handle: %d\n", HID_KBD_FUN_NAME,
    801             fun->handle);
     800        usb_log_debug("%s function created. Handle: %" PRIun "\n",
     801            HID_KBD_FUN_NAME, fun->handle);
    802802       
    803803        usb_log_debug("Adding DDF function to class %s...\n",
  • uspace/drv/usbhid/multimedia/multimedia.c

    r2002595 rb9e3aa3  
    211211        }
    212212       
    213         usb_log_debug("%s function created. Handle: %d\n", NAME, fun->handle);
     213        usb_log_debug("%s function created (jandle: %" PRIun ").\n",
     214            NAME, fun->handle);
    214215       
    215216        rc = ddf_fun_add_to_class(fun, "keyboard");
  • uspace/drv/usbhid/usbhid.c

    r2002595 rb9e3aa3  
    217217//          USB_HID_REPORT_TYPE_INPUT);
    218218        size_t size = 0;
    219         usb_hid_report_field_t *field = usb_hid_report_get_sibling (hid_dev->report,
    220                 NULL, usage_path, mapping->compare, USB_HID_REPORT_TYPE_INPUT);
    221         while(field != NULL) {
    222                 size++;
    223                 field = usb_hid_report_get_sibling (hid_dev->report,
     219
     220        usb_hid_report_description_t *report_des =
     221                usb_hid_report_find_description(hid_dev->report,
     222                mapping->report_id, USB_HID_REPORT_TYPE_INPUT);
     223
     224        while(report_des != NULL) {
     225
     226                if((mapping->report_id) == 0 && (report_des->report_id != 0)) {
     227                        usb_hid_report_path_set_report_id(usage_path,
     228                                report_des->report_id);
     229                }
     230
     231                usb_hid_report_field_t *field = usb_hid_report_get_sibling (
     232                        hid_dev->report,
     233                        NULL, usage_path, mapping->compare,
     234                        USB_HID_REPORT_TYPE_INPUT);
     235
     236                while(field != NULL) {
     237                        size++;
     238                        field = usb_hid_report_get_sibling (hid_dev->report,
    224239                                        field, usage_path, mapping->compare,
    225240                            USB_HID_REPORT_TYPE_INPUT);
     241                }
     242
     243                if((mapping->report_id == 0) && (report_des->report_id != 0)) {
     244                        uint8_t report_id = usb_hid_get_next_report_id(
     245                                hid_dev->report, report_des->report_id,
     246                                USB_HID_REPORT_TYPE_INPUT);
     247
     248                        if(report_id == 0) {
     249                                break;
     250                        }
     251
     252                        report_des = usb_hid_report_find_description(
     253                                hid_dev->report, report_id,
     254                                USB_HID_REPORT_TYPE_INPUT);
     255                }
     256                else {
     257                        break;
     258                }
    226259        }
    227260       
Note: See TracChangeset for help on using the changeset viewer.