Changeset a61c683 in mainline for uspace/drv/bus/usb/usbhub/port_status.h
- Timestamp:
- 2011-09-23T19:44:28Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 400f363
- Parents:
- aefa0d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port_status.h
raefa0d5 ra61c683 47 47 */ 48 48 typedef uint32_t usb_port_status_t; 49 // TODO Mind the endiannes, changes are in the first byte of the second word 50 // status is in the first byte of the first word 51 #define USB_HUB_PORT_STATUS_CONNECTION (1 << (USB_HUB_FEATURE_PORT_CONNECTION)) 52 #define USB_HUB_PORT_STATUS_ENABLED (1 << (USB_HUB_FEATURE_PORT_ENABLE)) 53 #define USB_HUB_PORT_STATUS_SUSPEND (1 << (USB_HUB_FEATURE_PORT_SUSPEND)) 54 #define USB_HUB_PORT_STATUS_OC (1 << (USB_HUB_FEATURE_PORT_OVER_CURRENT)) 55 #define USB_HUB_PORT_STATUS_RESET (1 << (USB_HUB_FEATURE_PORT_RESET)) 56 #define USB_HUB_PORT_STATUS_POWER (1 << (USB_HUB_FEATURE_PORT_POWER)) 57 #define USB_HUB_PORT_STATUS_LOW_SPEED (1 << (USB_HUB_FEATURE_PORT_LOW_SPEED)) 58 #define USB_HUB_PORT_STATUS_HIGH_SPEED (1 << 10) 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)) 59 65 60 66 #define USB_HUB_PORT_C_STATUS_CONNECTION \ 61 ( 1 << (USB_HUB_FEATURE_C_PORT_CONNECTION))67 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_CONNECTION))) 62 68 #define USB_HUB_PORT_C_STATUS_ENABLED \ 63 ( 1 << (USB_HUB_FEATURE_C_PORT_ENABLE))69 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_ENABLE))) 64 70 #define USB_HUB_PORT_C_STATUS_SUSPEND \ 65 ( 1 << (USB_HUB_FEATURE_C_PORT_SUSPEND))71 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_SUSPEND))) 66 72 #define USB_HUB_PORT_C_STATUS_OC \ 67 ( 1 << (USB_HUB_FEATURE_C_PORT_OVER_CURRENT))73 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_OVER_CURRENT))) 68 74 #define USB_HUB_PORT_C_STATUS_RESET \ 69 ( 1 << (USB_HUB_FEATURE_C_PORT_RESET))75 (uint32_usb2host(1 << (USB_HUB_FEATURE_C_PORT_RESET))) 70 76 71 77 /** … … 77 83 */ 78 84 typedef uint32_t usb_hub_status_t; 79 // TODO Mind the endiannes, changes are in the first byte of the second word80 // status is in the first byte of the first word81 85 #define USB_HUB_STATUS_OVER_CURRENT \ 82 ( 1 << (USB_HUB_FEATURE_HUB_OVER_CURRENT))86 (uint32_usb2host(1 << (USB_HUB_FEATURE_HUB_OVER_CURRENT))) 83 87 #define USB_HUB_STATUS_LOCAL_POWER \ 84 ( 1 << (USB_HUB_FEATURE_HUB_LOCAL_POWER))88 (uint32_usb2host(1 << (USB_HUB_FEATURE_HUB_LOCAL_POWER))) 85 89 86 90 #define USB_HUB_STATUS_C_OVER_CURRENT \ 87 ( 1 << (16 + USB_HUB_FEATURE_C_HUB_OVER_CURRENT))91 (uint32_usb2host(1 << (16 + USB_HUB_FEATURE_C_HUB_OVER_CURRENT))) 88 92 #define USB_HUB_STATUS_C_LOCAL_POWER \ 89 ( 1 << (16 + USB_HUB_FEATURE_C_HUB_LOCAL_POWER))93 (uint32_usb2host(1 << (16 + USB_HUB_FEATURE_C_HUB_LOCAL_POWER))) 90 94 91 95
Note:
See TracChangeset
for help on using the changeset viewer.