Changeset 129b821f in mainline for uspace/drv/bus/usb/usbhub/status.h
- Timestamp:
- 2018-01-20T12:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 682c9354
- Parents:
- 60d3f35
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 12:33:42)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 12:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/status.h
r60d3f35 r129b821f 97 97 (uint32_usb2host(1 << (16 + USB_HUB_FEATURE_C_HUB_LOCAL_POWER))) 98 98 99 100 /** 101 * speed getter for port status 102 * 103 * @param status 104 * @return speed of usb device (for more see usb specification) 105 */ 106 static inline usb_speed_t usb_port_speed(usb_port_status_t status) 99 static inline usb_speed_t usb_port_speed(usb_speed_t hub_speed, uint32_t status) 107 100 { 101 if (hub_speed == USB_SPEED_SUPER) 102 return USB_SPEED_SUPER; 103 if (hub_speed == USB_SPEED_HIGH && (status & USB_HUB_PORT_STATUS_HIGH_SPEED)) 104 return USB_SPEED_HIGH; 108 105 if ((status & USB_HUB_PORT_STATUS_LOW_SPEED) != 0) 109 106 return USB_SPEED_LOW; 110 if ((status & USB_HUB_PORT_STATUS_HIGH_SPEED) != 0)111 return USB_SPEED_HIGH;112 /* TODO: add super speed */113 107 return USB_SPEED_FULL; 114 108 }
Note:
See TracChangeset
for help on using the changeset viewer.