mikroSDK Reference Manual
Hub (Host only)

Data Structures

struct  TU_ATTR_PACKED
 AUDIO Channel Cluster Descriptor (4.1) More...
 
struct  hub_status_response_t
 
struct  hub_port_status_response_t
 

Typedefs

typedef struct TU_ATTR_PACKED descriptor_hub_desc_t
 

Enumerations

enum  {
  HUB_REQUEST_GET_STATUS = 0 , HUB_REQUEST_CLEAR_FEATURE = 1 , HUB_REQUEST_SET_FEATURE = 3 , HUB_REQUEST_GET_DESCRIPTOR = 6 ,
  HUB_REQUEST_SET_DESCRIPTOR = 7 , HUB_REQUEST_CLEAR_TT_BUFFER = 8 , HUB_REQUEST_RESET_TT = 9 , HUB_REQUEST_GET_TT_STATE = 10 ,
  HUB_REQUEST_STOP_TT = 11
}
 
enum  { HUB_FEATURE_HUB_LOCAL_POWER_CHANGE = 0 , HUB_FEATURE_HUB_OVER_CURRENT_CHANGE }
 
enum  {
  HUB_FEATURE_PORT_CONNECTION = 0 , HUB_FEATURE_PORT_ENABLE = 1 , HUB_FEATURE_PORT_SUSPEND = 2 , HUB_FEATURE_PORT_OVER_CURRENT = 3 ,
  HUB_FEATURE_PORT_RESET = 4 , HUB_FEATURE_PORT_POWER = 8 , HUB_FEATURE_PORT_LOW_SPEED = 9 , HUB_FEATURE_PORT_CONNECTION_CHANGE = 16 ,
  HUB_FEATURE_PORT_ENABLE_CHANGE = 17 , HUB_FEATURE_PORT_SUSPEND_CHANGE = 18 , HUB_FEATURE_PORT_OVER_CURRENT_CHANGE = 19 , HUB_FEATURE_PORT_RESET_CHANGE = 20 ,
  HUB_FEATURE_PORT_TEST = 21 , HUB_FEATURE_PORT_INDICATOR = 22
}
 

Functions list

 TU_VERIFY_STATIC (sizeof(descriptor_hub_desc_t)==9, "size is not correct")
 
 TU_VERIFY_STATIC (sizeof(hub_status_response_t)==4, "size is not correct")
 
 TU_VERIFY_STATIC (sizeof(hub_port_status_response_t)==4, "size is not correct")
 
bool hub_port_clear_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature, tuh_xfer_cb_t complete_cb, uintptr_t user_data)
 
bool hub_port_set_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature, tuh_xfer_cb_t complete_cb, uintptr_t user_data)
 
bool hub_port_get_status (uint8_t hub_addr, uint8_t hub_port, void *resp, tuh_xfer_cb_t complete_cb, uintptr_t user_data)
 
bool hub_edpt_status_xfer (uint8_t dev_addr)
 
void hub_init (void)
 
bool hub_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t max_len)
 
bool hub_set_config (uint8_t dev_addr, uint8_t itf_num)
 
bool hub_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
 
void hub_close (uint8_t dev_addr)