Ignore:
Timestamp:
2018-01-06T21:15:48Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56257ba
Parents:
c901632
Message:

usb: move endpoint descriptor parsing to HC

This better separates responsibilities. Now the device driver does not
care about the contents of an endpoint descriptor, and HC can parse the
values according to device's actual speed.

Currently, it is device driver's responsibility to fetch endpoint
descriptors, map them and register pipes - sending the endpoint
descriptor back to HC. HC then parses it, and fills the pipe
description, which then sends back to device driver. We shall probably
fetch the endpoint descriptor from inside the HC (also fixing the USB
spec violation of communication with EP0).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/bus.h

    rc901632 r9efad54  
    109109        int (*device_offline)(device_t *);                      /**< Optional */
    110110        endpoint_t *(*device_find_endpoint)(device_t*, usb_target_t, usb_direction_t);
    111         endpoint_t *(*endpoint_create)(device_t *, const usb_endpoint_desc_t *);
     111        endpoint_t *(*endpoint_create)(device_t *, const usb_endpoint_descriptors_t *);
    112112
    113113        /* Operations on endpoint */
     
    163163    const char *);
    164164
    165 int bus_endpoint_add(device_t *, const usb_endpoint_desc_t *, endpoint_t **);
     165int bus_endpoint_add(device_t *, const usb_endpoint_descriptors_t *, endpoint_t **);
    166166endpoint_t *bus_find_endpoint(device_t *, usb_target_t, usb_direction_t);
    167167int bus_endpoint_remove(endpoint_t *);
Note: See TracChangeset for help on using the changeset viewer.