Changeset 4e732f1a in mainline for uspace/lib/usbdev/src/pipes.c


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/usbdev/src/pipes.c

    r3de7a62 r4e732f1a  
    254254int usb_pipe_initialize(usb_pipe_t *pipe, usb_endpoint_t endpoint_no,
    255255    usb_transfer_type_t transfer_type, size_t max_packet_size,
    256     usb_direction_t direction, usb_dev_session_t *bus_session)
     256    usb_direction_t direction, unsigned packets, usb_dev_session_t *bus_session)
    257257{
    258258        assert(pipe);
     
    260260        pipe->endpoint_no = endpoint_no;
    261261        pipe->transfer_type = transfer_type;
     262        pipe->packets = packets;
    262263        pipe->max_packet_size = max_packet_size;
    263264        pipe->direction = direction;
     
    279280
    280281        const int rc = usb_pipe_initialize(pipe, 0, USB_TRANSFER_CONTROL,
    281             CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH, bus_session);
     282            CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH, 1, bus_session);
    282283
    283284        pipe->auto_reset_halt = true;
     
    301302        const int ret = usb_register_endpoint(exch, pipe->endpoint_no,
    302303            pipe->transfer_type, pipe->direction, pipe->max_packet_size,
    303             interval);
     304            pipe->packets, interval);
    304305        async_exchange_end(exch);
    305306        return ret;
Note: See TracChangeset for help on using the changeset viewer.