Changeset 25971d2 in mainline


Ignore:
Timestamp:
2011-02-06T22:55:30Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
79d2987
Parents:
cd50486
Message:

Endpoint pipes has maximum packet size

Location:
uspace
Files:
4 edited

Legend:

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

    rcd50486 r25971d2  
    426426         */
    427427        rc = usb_endpoint_pipe_initialize(&kbd_dev->poll_pipe, &kbd_dev->wire,
    428             GUESSED_POLL_ENDPOINT, USB_TRANSFER_INTERRUPT, USB_DIRECTION_IN);
     428            GUESSED_POLL_ENDPOINT, USB_TRANSFER_INTERRUPT, 8, USB_DIRECTION_IN);
    429429        if (rc != EOK) {
    430430                printf("Failed to initialize interrupt in pipe: %s.\n",
  • uspace/lib/usb/include/usb/pipes.h

    rcd50486 r25971d2  
    7474        usb_direction_t direction;
    7575
     76        /** Maximum packet size for the endpoint. */
     77        size_t max_packet_size;
     78
    7679        /** Phone to the host controller.
    7780         * Negative when no session is active.
     
    118121int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *,
    119122    usb_device_connection_t *,
    120     usb_endpoint_t, usb_transfer_type_t, usb_direction_t);
     123    usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t);
    121124int usb_endpoint_pipe_initialize_default_control(usb_endpoint_pipe_t *,
    122125    usb_device_connection_t *);
  • uspace/lib/usb/src/pipes.c

    rcd50486 r25971d2  
    123123 * @param endpoint_no Endpoint number (in USB 1.1 in range 0 to 15).
    124124 * @param transfer_type Transfer type (e.g. interrupt or bulk).
     125 * @param max_packet_size Maximum packet size in bytes.
    125126 * @param direction Endpoint direction (in/out).
    126127 * @return Error code.
     
    128129int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *pipe,
    129130    usb_device_connection_t *connection, usb_endpoint_t endpoint_no,
    130     usb_transfer_type_t transfer_type, usb_direction_t direction)
     131    usb_transfer_type_t transfer_type, size_t max_packet_size,
     132    usb_direction_t direction)
    131133{
    132134        assert(pipe);
     
    137139        pipe->endpoint_no = endpoint_no;
    138140        pipe->transfer_type = transfer_type;
     141        pipe->max_packet_size = max_packet_size;
    139142        pipe->direction = direction;
    140143
     
    156159
    157160        int rc = usb_endpoint_pipe_initialize(pipe, connection,
    158             0, USB_TRANSFER_CONTROL, USB_DIRECTION_BOTH);
     161            0, USB_TRANSFER_CONTROL, 8, USB_DIRECTION_BOTH);
    159162
    160163        return rc;
  • uspace/lib/usb/src/pipesinit.c

    rcd50486 r25971d2  
    182182
    183183        int rc = usb_endpoint_pipe_initialize(ep_mapping->pipe, wire,
    184             ep_no, description.transfer_type, description.direction);
     184            ep_no, description.transfer_type, endpoint->max_packet_size,
     185            description.direction);
    185186        if (rc != EOK) {
    186187                return rc;
Note: See TracChangeset for help on using the changeset viewer.