39#include "common/tusb_common.h"
87 uint16_t wHubCharacteristics;
88 uint8_t bPwrOn2PwrGood;
89 uint8_t bHubContrCurrent;
90 uint8_t DeviceRemovable;
91 uint8_t PortPwrCtrlMask;
97 HUB_REQUEST_GET_STATUS = 0 ,
98 HUB_REQUEST_CLEAR_FEATURE = 1 ,
100 HUB_REQUEST_SET_FEATURE = 3 ,
102 HUB_REQUEST_GET_DESCRIPTOR = 6 ,
103 HUB_REQUEST_SET_DESCRIPTOR = 7 ,
104 HUB_REQUEST_CLEAR_TT_BUFFER = 8 ,
105 HUB_REQUEST_RESET_TT = 9 ,
106 HUB_REQUEST_GET_TT_STATE = 10 ,
107 HUB_REQUEST_STOP_TT = 11
111 HUB_FEATURE_HUB_LOCAL_POWER_CHANGE = 0,
112 HUB_FEATURE_HUB_OVER_CURRENT_CHANGE
116 HUB_FEATURE_PORT_CONNECTION = 0,
117 HUB_FEATURE_PORT_ENABLE = 1,
118 HUB_FEATURE_PORT_SUSPEND = 2,
119 HUB_FEATURE_PORT_OVER_CURRENT = 3,
120 HUB_FEATURE_PORT_RESET = 4,
122 HUB_FEATURE_PORT_POWER = 8,
123 HUB_FEATURE_PORT_LOW_SPEED = 9,
125 HUB_FEATURE_PORT_CONNECTION_CHANGE = 16,
126 HUB_FEATURE_PORT_ENABLE_CHANGE = 17,
127 HUB_FEATURE_PORT_SUSPEND_CHANGE = 18,
128 HUB_FEATURE_PORT_OVER_CURRENT_CHANGE = 19,
129 HUB_FEATURE_PORT_RESET_CHANGE = 20,
130 HUB_FEATURE_PORT_TEST = 21,
131 HUB_FEATURE_PORT_INDICATOR = 22
138 uint16_t local_power_source : 1;
139 uint16_t over_current : 1;
153 uint16_t connection : 1;
154 uint16_t port_enable : 1;
155 uint16_t suspend : 1;
156 uint16_t over_current : 1;
160 uint16_t port_power : 1;
161 uint16_t low_speed : 1;
162 uint16_t high_speed : 1;
163 uint16_t port_test_mode : 1;
164 uint16_t port_indicator_control : 1;
165 uint16_t TU_RESERVED : 3;
175bool hub_port_clear_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature,
176 tuh_xfer_cb_t complete_cb, uintptr_t user_data);
179bool hub_port_set_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature,
180 tuh_xfer_cb_t complete_cb, uintptr_t user_data);
183bool hub_port_get_status (uint8_t hub_addr, uint8_t hub_port,
void* resp,
184 tuh_xfer_cb_t complete_cb, uintptr_t user_data);
187bool hub_edpt_status_xfer(uint8_t dev_addr);
190static inline bool hub_port_reset(uint8_t hub_addr, uint8_t hub_port,
191 tuh_xfer_cb_t complete_cb, uintptr_t user_data)
193 return hub_port_set_feature(hub_addr, hub_port, HUB_FEATURE_PORT_RESET, complete_cb, user_data);
197static inline bool hub_port_clear_reset_change(uint8_t hub_addr, uint8_t hub_port,
198 tuh_xfer_cb_t complete_cb, uintptr_t user_data)
200 return hub_port_clear_feature(hub_addr, hub_port, HUB_FEATURE_PORT_RESET_CHANGE, complete_cb, user_data);
208bool hub_open (uint8_t rhport, uint8_t dev_addr,
tusb_desc_interface_t const *itf_desc, uint16_t max_len);
209bool hub_set_config (uint8_t dev_addr, uint8_t itf_num);
210bool hub_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
211void hub_close (uint8_t dev_addr);
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
Definition audio.h:657
uint8_t bLength
Size of this descriptor in bytes: 9.
Definition audio.h:656
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647