Changeset 4ee5272 in mainline
- Timestamp:
- 2014-01-19T04:45:39Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2be477d5
- Parents:
- 615abda
- Location:
- uspace
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/status.h
r615abda r4ee5272 64 64 #define USB_HUB_PORT_STATUS_HIGH_SPEED \ 65 65 (uint32_usb2host(1 << 10)) 66 #define USB_HUB_PORT_STATUS_TEST_MODE \ 67 (uint32_usb2host(1 << 11)) 68 #define USB_HUB_PORT_INDICATOR_CONTROL \ 69 (uint32_usb2host(1 << 12)) 66 70 67 71 #define USB_HUB_PORT_C_STATUS_CONNECTION \ -
uspace/lib/usb/include/usb/classes/hub.h
r615abda r4ee5272 43 43 */ 44 44 typedef enum { 45 USB_HUB_FEATURE_C_HUB_LOCAL_POWER = 0, 46 USB_HUB_FEATURE_C_HUB_OVER_CURRENT = 1, 45 47 USB_HUB_FEATURE_HUB_LOCAL_POWER = 0, 46 48 USB_HUB_FEATURE_HUB_OVER_CURRENT = 1, 47 USB_HUB_FEATURE_C_HUB_LOCAL_POWER = 0,48 USB_HUB_FEATURE_C_HUB_OVER_CURRENT = 1,49 49 USB_HUB_FEATURE_PORT_CONNECTION = 0, 50 50 USB_HUB_FEATURE_PORT_ENABLE = 1, … … 59 59 USB_HUB_FEATURE_C_PORT_OVER_CURRENT = 19, 60 60 USB_HUB_FEATURE_C_PORT_RESET = 20, 61 USB_HUB_FEATURE_PORT_TEST = 21, 62 USB_HUB_FEATURE_PORT_INDICATOR = 22 61 63 /* USB_HUB_FEATURE_ = , */ 62 64 } usb_hub_class_feature_t; … … 171 173 /** */ 172 174 USB_HUB_REQUEST_CLEAR_FEATURE = 1, 173 /** */175 /** USB 1.0 only */ 174 176 USB_HUB_REQUEST_GET_STATE = 2, 175 177 /** */ … … 178 180 USB_HUB_REQUEST_GET_DESCRIPTOR = 6, 179 181 /** */ 180 USB_HUB_REQUEST_SET_DESCRIPTOR = 7 182 USB_HUB_REQUEST_SET_DESCRIPTOR = 7, 183 /** */ 184 USB_HUB_REQUEST_CLEAR_TT_BUFFER = 8, 185 /** */ 186 USB_HUB_REQUEST_RESET_TT = 9, 187 /** */ 188 USB_HUB_GET_TT_STATE = 10, 189 /** */ 190 USB_HUB_STOP_TT = 11, 181 191 } usb_hub_request_t; 182 192 … … 185 195 */ 186 196 /* 7 (basic size) + 2*32 (port bitmasks) */ 187 #define USB_HUB_MAX_DESCRIPTOR_SIZE 71197 #define USB_HUB_MAX_DESCRIPTOR_SIZE (7 + 2 * 32) 188 198 189 199 #endif -
uspace/lib/usb/include/usb/descriptor.h
r615abda r4ee5272 45 45 USB_DESCTYPE_INTERFACE = 4, 46 46 USB_DESCTYPE_ENDPOINT = 5, 47 /* New in USB2.0 */ 48 USB_DESCTYPE_DEVICE_QUALIFIER = 6, 49 USB_DESCTYPE_OTHER_SPEED_CONFIGURATION = 7, 50 USB_DESCTYPE_INTERFACE_POWER = 8, 51 /* Class specific */ 47 52 USB_DESCTYPE_HID = 0x21, 48 53 USB_DESCTYPE_HID_REPORT = 0x22, … … 89 94 } __attribute__ ((packed)) usb_standard_device_descriptor_t; 90 95 96 /** USB device qualifier decriptor is basically a cut down version of the device 97 * descriptor with values that would be valid if the device operated on the 98 * other speed (HIGH vs. FULL) 99 */ 100 typedef struct { 101 /** Size of this descriptor in bytes */ 102 uint8_t length; 103 /** Descriptor type (USB_DESCTYPE_DEVICE_QUALIFIER) */ 104 uint8_t descriptor_type; 105 /** USB specification release number. 106 * The number shall be coded as binary-coded decimal (BCD). 107 */ 108 uint16_t usb_spec_version; 109 /** Device class. */ 110 uint8_t device_class; 111 /** Device sub-class. */ 112 uint8_t device_subclass; 113 /** Device protocol. */ 114 uint8_t device_protocol; 115 /** Maximum packet size for endpoint zero. 116 * Valid values are only 8, 16, 32, 64). 117 */ 118 uint8_t max_packet_size; 119 /** Number of possible configurations. */ 120 uint8_t configuration_count; 121 uint8_t reserved; 122 } __attribute__ ((packed)) usb_standard_device_qualifier_descriptor_t; 123 91 124 /** Standard USB configuration descriptor. 92 125 */ … … 116 149 } __attribute__ ((packed)) usb_standard_configuration_descriptor_t; 117 150 151 /** USB Other Speed Configuration descriptor shows values that would change 152 * in the configuration descriptor if the device operated at its other 153 * possible speed (HIGH vs. FULL) 154 */ 155 typedef usb_standard_configuration_descriptor_t 156 usb_other_speed_configuration_descriptor_t; 157 118 158 /** Standard USB interface descriptor. 119 159 */ -
uspace/lib/usb/include/usb/request.h
r615abda r4ee5272 54 54 } usb_stddevreq_t; 55 55 56 /** Standard device features */ 57 typedef enum { 58 USB_FEATURE_ENDPOINT_HALT = 0, 59 USB_FEATURE_DEVICE_REMOTE_WAKEUP = 1, 60 USB_FEATURE_TEST_MODE = 2 61 } usb_std_feature_t; 62 56 63 /** USB device status - device is self powered (opposed to bus powered). */ 57 64 #define USB_DEVICE_STATUS_SELF_POWERED ((uint16_t)(1 << 0)) … … 62 69 /** USB endpoint status - endpoint is halted (stalled). */ 63 70 #define USB_ENDPOINT_STATUS_HALTED ((uint16_t)(1 << 0)) 64 65 /** USB feature selector - endpoint halt (stall). */66 #define USB_FEATURE_SELECTOR_ENDPOINT_HALT (0)67 68 /** USB feature selector - device remote wake-up. */69 #define USB_FEATURE_SELECTOR_REMOTE_WAKEUP (1)70 71 71 72 /** Device request setup packet. -
uspace/lib/usb/src/usb.c
r615abda r4ee5272 135 135 /* 0x2 ( HOST to device | STANDART | TO ENPOINT) */ 136 136 if ((request->request_type == 0x2) && 137 (request->value == USB_FEATURE_ SELECTOR_ENDPOINT_HALT))137 (request->value == USB_FEATURE_ENDPOINT_HALT)) 138 138 return uint16_usb2host(request->index); 139 139 break; -
uspace/lib/usbdev/src/request.c
r615abda r4ee5272 823 823 return usb_request_clear_feature(pipe, 824 824 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_ENDPOINT, 825 uint16_host2usb(USB_FEATURE_ SELECTOR_ENDPOINT_HALT),825 uint16_host2usb(USB_FEATURE_ENDPOINT_HALT), 826 826 uint16_host2usb(ep_index)); 827 827 }
Note:
See TracChangeset
for help on using the changeset viewer.