tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
hub.h File Reference
#include "common/common.h"
#include "usbh.h"

Go to the source code of this file.

Data Structures

struct  descriptor_hub_desc_t
 
struct  hub_status_response_t
 
struct  hub_port_status_response_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

 STATIC_ASSERT (sizeof(descriptor_hub_desc_t)==9,"size is not correct")
 
 STATIC_ASSERT (sizeof(hub_status_response_t)==4,"size is not correct")
 
 STATIC_ASSERT (sizeof(hub_port_status_response_t)==4,"size is not correct")
 
tusb_error_t hub_port_reset_subtask (uint8_t hub_addr, uint8_t hub_port)
 
tusb_error_t hub_port_clear_feature_subtask (uint8_t hub_addr, uint8_t hub_port, uint8_t feature)
 
tusb_speed_t hub_port_get_speed (void)
 
tusb_error_t hub_status_pipe_queue (uint8_t dev_addr)
 

Detailed Description

Author
hathach (tinyusb.org)

LICENSE

Software License Agreement (BSD License)

Copyright (c) 2013, hathach (tinyusb.org) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file is part of the tinyusb stack.

Definition in file hub.h.