Changeset a9cdca0 in mainline


Ignore:
Timestamp:
2011-05-26T11:53:33Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da56be2
Parents:
c0940a85
Message:

Saving byte size of report to usb_hid_dev_t + removed printf from driver.c

Location:
uspace
Files:
2 edited

Legend:

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

    rc0940a85 ra9cdca0  
    361361       
    362362        uint8_t report_id = 0;
    363         size_t size = usb_hid_report_size(hid_dev->report, report_id,
     363        size_t size = usb_hid_report_byte_size(hid_dev->report, report_id,
    364364            USB_HID_REPORT_TYPE_INPUT);
    365365       
    366366        size_t max_size = 0;
    367367       
    368         while (size > 0) {
     368        do {
    369369                max_size = (size > max_size) ? size : max_size;
    370                 size = usb_hid_report_size(hid_dev->report, report_id,
     370                size = usb_hid_report_byte_size(hid_dev->report, report_id,
    371371                    USB_HID_REPORT_TYPE_INPUT);
    372                 ++report_id;
    373         }
     372                report_id = usb_hid_get_next_report_id(hid_dev->report,
     373                    report_id, USB_HID_REPORT_TYPE_INPUT);
     374        } while (report_id != 0);
    374375       
    375376        usb_log_debug("Max size of input report: %zu\n", max_size);
     
    549550//      int allocated = (hid_dev->input_report != NULL);
    550551        assert(hid_dev->input_report != NULL);
     552        usb_log_debug("Max input report size: %zu, buffer size: %zu\n",
     553            hid_dev->max_input_report_size, buffer_size);
    551554        assert(hid_dev->max_input_report_size >= buffer_size);
    552555       
  • uspace/lib/drv/generic/driver.c

    rc0940a85 ra9cdca0  
    346346                sysarg_t method = IPC_GET_IMETHOD(call);
    347347                int iface_idx;
    348                
    349                 printf("driver_connection_gen(): method: %d\n", method);
    350348               
    351349                switch  (method) {
     
    397395                         * handling ("remote interface").
    398396                         */
    399                         printf("iface_idx: %d\n", iface_idx);
    400397                        remote_iface_t *rem_iface = get_remote_iface(iface_idx);
    401398                        assert(rem_iface != NULL);
Note: See TracChangeset for help on using the changeset viewer.