Changeset cd3fa47 in mainline for uspace/drv/bus/usb/usbhub/status.h
- Timestamp:
- 2018-01-21T18:35:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3f02935
- Parents:
- 32b2a6f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/status.h
r32b2a6f2 rcd3fa47 38 38 39 39 /** 40 * structure holding port status and changes flags.41 * should not be accessed directly, use supplied getter/setter methods.42 *43 * For more information refer to tables 11-15 and 11-16 in44 * "Universal Serial Bus Specification Revision 1.1" pages 274 and 27745 * (290 and 293 in pdf)46 *47 */48 typedef uint32_t usb_port_status_t;49 #define USB_HUB_PORT_STATUS_CONNECTION \50 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_CONNECTION)))51 #define USB_HUB_PORT_STATUS_ENABLED \52 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_ENABLE)))53 #define USB_HUB_PORT_STATUS_SUSPEND \54 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_SUSPEND)))55 #define USB_HUB_PORT_STATUS_OC \56 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_OVER_CURRENT)))57 #define USB_HUB_PORT_STATUS_RESET \58 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_RESET)))59 #define USB_HUB_PORT_STATUS_POWER \60 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_POWER)))61 #define USB_HUB_PORT_STATUS_LOW_SPEED \62 (uint32_usb2host(1 << (USB_HUB_FEATURE_PORT_LOW_SPEED)))63 #define USB_HUB_PORT_STATUS_HIGH_SPEED \64 (uint32_usb2host(1 << 10))65 #define USB_HUB_PORT_STATUS_TEST_MODE \66 (uint32_usb2host(1 << 11))67 #define USB_HUB_PORT_INDICATOR_CONTROL \68 (uint32_usb2host(1 << 12))69 70 #define USB_HUB_PORT_C_STATUS_CONNECTION \71 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_CONNECTION)))72 #define USB_HUB_PORT_C_STATUS_ENABLED \73 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_ENABLE)))74 #define USB_HUB_PORT_C_STATUS_SUSPEND \75 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_SUSPEND)))76 #define USB_HUB_PORT_C_STATUS_OC \77 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_OVER_CURRENT)))78 #define USB_HUB_PORT_C_STATUS_RESET \79 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_RESET)))80 81 /**82 40 * structure holding hub status and changes flags. 83 41 * … … 101 59 if (hub_speed == USB_SPEED_SUPER) 102 60 return USB_SPEED_SUPER; 103 if (hub_speed == USB_SPEED_HIGH && (status & USB _HUB_PORT_STATUS_HIGH_SPEED))61 if (hub_speed == USB_SPEED_HIGH && (status & USB2_HUB_PORT_STATUS_HIGH_SPEED)) 104 62 return USB_SPEED_HIGH; 105 if ((status & USB _HUB_PORT_STATUS_LOW_SPEED) != 0)63 if ((status & USB2_HUB_PORT_STATUS_LOW_SPEED) != 0) 106 64 return USB_SPEED_LOW; 107 65 return USB_SPEED_FULL;
Note:
See TracChangeset
for help on using the changeset viewer.