Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c901632 in mainline


Ignore:
Timestamp:
2018-01-06T00:04:48Z (4 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master
Children:
9efad54
Parents:
3f42eab
Message:

usbdev: polling interval and interval is the same thing

Location:
uspace/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usb_iface.h

    r3f42eab rc901632  
    100100} usb_target_t;
    101101
    102 /** Description of usb endpoint.
     102/** Description of an usb endpoint.
    103103 */
    104104typedef struct {
     
    108108        unsigned bytes_per_interval;
    109109} usb3_endpoint_desc_t;
    110 
    111 typedef struct {
    112         unsigned polling_interval;
    113 } usb2_endpoint_desc_t;
    114110
    115111typedef struct usb_endpoint_desc {
     
    133129        unsigned packets;
    134130
    135         /** Bus version specific information */
    136         usb2_endpoint_desc_t usb2;
     131        /** Superspeed-specific information */
    137132        usb3_endpoint_desc_t usb3;
    138133} usb_endpoint_desc_t;
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    r3f42eab rc901632  
    106106    size_t, const uint8_t *, size_t, usb_dev_session_t *);
    107107
    108 int usb_pipe_register(usb_pipe_t *, unsigned);
     108int usb_pipe_register(usb_pipe_t *);
    109109int usb_pipe_unregister(usb_pipe_t *);
    110110
  • uspace/lib/usbdev/src/devdrv.c

    r3f42eab rc901632  
    257257        for (size_t i = 0; i < pipe_count; i++) {
    258258                if (pipes[i].present) {
    259                         rc = usb_pipe_register(&pipes[i].pipe,
    260                             pipes[i].descriptor->poll_interval);
     259                        rc = usb_pipe_register(&pipes[i].pipe);
    261260                        if (rc != EOK) {
    262261                                goto rollback_unregister_endpoints;
  • uspace/lib/usbdev/src/pipes.c

    r3f42eab rc901632  
    316316 * @return Error code.
    317317 */
    318 int usb_pipe_register(usb_pipe_t *pipe, unsigned interval)
     318int usb_pipe_register(usb_pipe_t *pipe)
    319319{
    320320        assert(pipe);
    321321        assert(pipe->bus_session);
    322322
    323         pipe->desc.usb2.polling_interval = interval;
    324323        async_exch_t *exch = async_exchange_begin(pipe->bus_session);
    325324        if (!exch)
  • uspace/lib/usbdev/src/pipesinit.c

    r3f42eab rc901632  
    178178        };
    179179
    180         /* TODO Extract USB2-related information */
    181         ep_desc->usb2 = (usb2_endpoint_desc_t) { 0 };
    182 
    183180        if (companion_desc) {
    184181                ep_desc->usb3 = (usb3_endpoint_desc_t) {
  • uspace/lib/usbhost/src/ddf_helpers.c

    r3f42eab rc901632  
    7979                usb_str_transfer_type(endpoint_desc->transfer_type),
    8080                usb_str_direction(endpoint_desc->direction),
    81                 endpoint_desc->max_packet_size, endpoint_desc->usb2.polling_interval);
     81                endpoint_desc->max_packet_size, endpoint_desc->interval);
    8282
    8383        return bus_endpoint_add(dev, endpoint_desc, NULL);
Note: See TracChangeset for help on using the changeset viewer.