Changeset 45e49e6 in mainline for uspace/lib/usbdev/src/devdrv.c


Ignore:
Timestamp:
2018-01-20T18:53:23Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
26beeda
Parents:
24fcb8b
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-20 18:52:27)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-20 18:53:23)
Message:

usbhub: handle superspeed hubs

File:
1 edited

Legend:

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

    r24fcb8b r45e49e6  
    7676        /** USB address of this device */
    7777        usb_address_t address;
     78
     79        /** Depth in the USB hub hiearchy */
     80        unsigned depth;
    7881
    7982        /** USB speed of this device */
     
    364367}
    365368
    366 usb_speed_t usb_device_get_speed(usb_device_t *usb_dev)
     369usb_address_t usb_device_get_address(const usb_device_t *usb_dev)
     370{
     371        assert(usb_dev);
     372        return usb_dev->depth;
     373}
     374
     375unsigned usb_device_get_depth(const usb_device_t *usb_dev)
     376{
     377        assert(usb_dev);
     378        return usb_dev->depth;
     379}
     380
     381usb_speed_t usb_device_get_speed(const usb_device_t *usb_dev)
    367382{
    368383        assert(usb_dev);
     
    370385}
    371386
    372 int usb_device_get_iface_number(usb_device_t *usb_dev)
     387int usb_device_get_iface_number(const usb_device_t *usb_dev)
    373388{
    374389        assert(usb_dev);
     
    376391}
    377392
    378 devman_handle_t usb_device_get_devman_handle(usb_device_t *usb_dev)
     393devman_handle_t usb_device_get_devman_handle(const usb_device_t *usb_dev)
    379394{
    380395        assert(usb_dev);
     
    498513        if (ret == EOK) {
    499514                dev->address = dev_desc.address;
     515                dev->depth = dev_desc.depth;
    500516                dev->speed = dev_desc.speed;
    501517                dev->handle = dev_desc.handle;
Note: See TracChangeset for help on using the changeset viewer.