Changeset 816f5f4 in mainline for uspace/lib/usbdev/src/pipesinit.c


Ignore:
Timestamp:
2017-10-15T16:55:48Z (7 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b2f69e
Parents:
2770b66
Message:

Remote USB (async) sending structures

remote_usb_register_endpoint is now sending a whole new structure, instead of 5 numeric arguments pulled out of structure.
This allows future extensibility for the structure as well as a working code to be used for other remote async calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/pipesinit.c

    r2770b66 r816f5f4  
    288288        if (config_descriptor == NULL)
    289289                return EBADMEM;
    290        
     290
    291291        if (config_descriptor_size <
    292292            sizeof(usb_standard_configuration_descriptor_t)) {
     
    343343        static_assert(DEV_DESCR_MAX_PACKET_SIZE_OFFSET < CTRL_PIPE_MIN_PACKET_SIZE);
    344344
    345         if ((pipe->direction != USB_DIRECTION_BOTH) ||
    346             (pipe->transfer_type != USB_TRANSFER_CONTROL) ||
    347             (pipe->endpoint_no != 0)) {
     345        if ((pipe->desc.direction != USB_DIRECTION_BOTH) ||
     346            (pipe->desc.transfer_type != USB_TRANSFER_CONTROL) ||
     347            (pipe->desc.endpoint_no != 0)) {
    348348                return EINVAL;
    349349        }
     
    369369        }
    370370
    371         pipe->max_packet_size
     371        pipe->desc.max_packet_size
    372372            = dev_descr_start[DEV_DESCR_MAX_PACKET_SIZE_OFFSET];
    373373
Note: See TracChangeset for help on using the changeset viewer.