Changeset 4c25c2fb in mainline for uspace/lib/usbhost/src/hcd.c


Ignore:
Timestamp:
2018-01-15T15:02:57Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
745a3f1
Parents:
01d9707
Message:

usbhost: move managing TT to the library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/hcd.c

    r01d9707 r4c25c2fb  
    426426        }
    427427        return EOK;
    428 }
    429 
    430 /**
    431  * Setup devices Transaction Translation.
    432  *
    433  * This applies for Low/Full speed devices under High speed hub only. Other
    434  * devices just inherit TT from the hub.
    435  *
    436  * Roothub must be handled specially.
    437  */
    438 void hcd_setup_device_tt(device_t *dev)
    439 {
    440         if (!dev->hub)
    441                 return;
    442 
    443         if (dev->hub->speed == USB_SPEED_HIGH && usb_speed_is_11(dev->speed)) {
    444                 /* For LS devices under HS hub */
    445                 dev->tt.address = dev->hub->address;
    446                 dev->tt.port = dev->port;
    447         }
    448         else {
    449                 /* Inherit hub's TT */
    450                 dev->tt = dev->hub->tt;
    451         }
    452428}
    453429
Note: See TracChangeset for help on using the changeset viewer.