Ignore:
Timestamp:
2014-01-24T02:10:16Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
42de21a
Parents:
3de7a62
Message:

usb: Add support for multiple packets per microframe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    r3de7a62 r4e732f1a  
    110110    ddf_fun_t *fun, usb_endpoint_t endpoint,
    111111    usb_transfer_type_t transfer_type, usb_direction_t direction,
    112     size_t max_packet_size, unsigned interval)
     112    size_t max_packet_size, unsigned packets, unsigned interval)
    113113{
    114114        assert(fun);
     
    126126
    127127        return hcd_add_ep(hcd, target, direction, transfer_type,
    128             max_packet_size, size, dev->tt_address, dev->port);
     128            max_packet_size, packets, size, dev->tt_address, dev->port);
    129129}
    130130
     
    491491        ret = hcd_add_ep(hcd,
    492492            default_target, USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL,
    493             CTRL_PIPE_MIN_PACKET_SIZE, CTRL_PIPE_MIN_PACKET_SIZE,
     493            CTRL_PIPE_MIN_PACKET_SIZE, CTRL_PIPE_MIN_PACKET_SIZE, 1,
    494494            tt_address, port);
    495495
     
    517517        /* Register EP on the new address */
    518518        ret = hcd_add_ep(hcd, target, USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL,
    519             desc.max_packet_size, desc.max_packet_size, tt_address, port);
     519            ED_MPS_PACKET_SIZE_GET(uint16_usb2host(desc.max_packet_size)),
     520            ED_MPS_TRANS_OPPORTUNITIES_GET(uint16_usb2host(desc.max_packet_size)),
     521            ED_MPS_PACKET_SIZE_GET(uint16_usb2host(desc.max_packet_size)),
     522            tt_address, port);
    520523        if (ret != EOK) {
    521524                hcd_remove_ep(hcd, default_target, USB_DIRECTION_BOTH);
Note: See TracChangeset for help on using the changeset viewer.