⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 host20_ap_hub.h

📁 FIC8120方案的 StartCell_Driver
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////
//
//	File name: Host20_AP_Hub.H
//	Version: 1.0
//	Date: 2004/1/07
//
//	Author: Bruce
//	Email: 
//	Phone: (03) 578-7888
//	Company: Faraday Tech. Corp.
//
//	Description: 
///////////////////////////////////////////////////////////////////////////////
#ifndef HOST20_AP_HUB__H

  #define HOST20_AP_HUB__H

//=================== 1.Condition Definition  ============================================================
//========================================================================================================
 


//=================== 2.Define Data Type  ================================================================
//========================================================================================================

//Define for Command->RequestType
#define HOST20_HUB_RequestType_In          0xA0
#define HOST20_HUB_RequestType_Out         0x20
#define HOST20_HUB_RequestType_About_Port  0x03
#define HOST20_HUB_RequestType_About_Hub   0x00
//Define for Command->Request
#define HOST20_HUB_Request_GetStatus       0x00
#define HOST20_HUB_Request_ClearFeature    0x01
#define HOST20_HUB_Request_GetSTATE        0x02
#define HOST20_HUB_Request_SetFeature      0x03
#define HOST20_HUB_Request_GetDescriptor   0x06
#define HOST20_HUB_Request_SetDescriptor   0x07
#define HOST20_HUB_Request_CleatTTBuffer   0x08
#define HOST20_HUB_Request_ResetTT         0x09
#define HOST20_HUB_Request_GetTTState      0x0A
#define HOST20_HUB_Request_StopTT          0x0B
 
//Define for Command->Value
#define HOST20_HUB_FEATURE_PORT_CONNECTION     0x0000
#define HOST20_HUB_FEATURE_PORT_ENABLE         0x0001
#define HOST20_HUB_FEATURE_PORT_SUSPEND        0x0002
#define HOST20_HUB_FEATURE_PORT_OVER_CURRENT   0x0003
#define HOST20_HUB_FEATURE_PORT_RESET          0x0004
#define HOST20_HUB_FEATURE_PORT_POWER          0x0008
#define HOST20_HUB_FEATURE_PORT_LOW_SPEED      0x0009
#define HOST20_HUB_FEATURE_C_PORT_CONNECTION   0x0010
#define HOST20_HUB_FEATURE_C_PORT_ENABLE       0x0011
#define HOST20_HUB_FEATURE_C_PORT_SUSPEND      0x0012
#define HOST20_HUB_FEATURE_C_PORT_OVER_CURRENT 0x0013
#define HOST20_HUB_FEATURE_C_PORT_RESET        0x0014
#define HOST20_HUB_FEATURE_C_PORT_TEST         0x0015
#define HOST20_HUB_FEATURE_C_PORT_INDICATOR    0x0016


//Define for Command->Index
#define HOST20_HUB_Index_Port1    0x0001
#define HOST20_HUB_Index_Port2    0x0002
#define HOST20_HUB_Index_Port3    0x0003
#define HOST20_HUB_Index_Port4    0x0004


//=================== 3.Structure Definition =============================================================
//========================================================================================================
 typedef struct {
     
      //For Port Status
      UINT32   bSts_CurrentConnect:1;          
      UINT32   bSts_PortEnableDisable:1;            
      UINT32   bSts_Suspend:1;         
      UINT32   bSts_OverCurrent:1; 
      UINT32   bSts_Reset:1;          
      UINT32   bSts_Bit567Reserved:3;          
      UINT32   bSts_PortPower:1;          
      UINT32   bSts_LowSpeedAttached:1;          
      UINT32   bSts_HighSpeedAttached:1;          
      UINT32   bSts_PortTest:1;          
      UINT32   bSts_PortIndicator:1;          
      UINT32   bSts_Bit131415Reserved:3;     
      //For Port Change Field
      UINT32   bChg_Connect:1;        
      UINT32   bChg_PortEnableDisable:1;        
      UINT32   bChg_Suspend:1;        
      UINT32   bChg_OverCurrent:1;        
      UINT32   bChg_ResetComplete:1;        
      UINT32   bChg_Bit567Reserved:3;        
      UINT32   bChg_Reserved2:8;        
  
 } Host20_Hub_Port_Status_Structure;

 typedef struct {
     
      UINT8   bDescLength;
      UINT8   bDescriptorType;     
      UINT8   bNbrPort;    
      UINT16  bHubCharacteristics;   
      UINT8   bPwrOn2PwrGood;    
      UINT8   bHubControlCurrent;   
      UINT8   bDeviceRemovable;   
      UINT8   abPortPwrCtrlMask[10];//Max=10 port  
          
 } Host20_Hub_Class_Descriptor_Structure;
 
  
  typedef struct {
 
      Host20_Hub_Class_Descriptor_Structure   sDes;     
      Host20_Attach_Device_Structure          bDeviceAOnHub[4];
          
 } Host20_Hub_Attach_Structure;
 
 
 
//=================== 4.Extern Function Definition =======================================================
//========================================================================================================

 
//=================== 5.Extern Variable Definition =======================================================
//========================================================================================================
    extern UINT8 OTGH_GETDESCRIPTOR_DEVICE_8[];
	extern UINT8 OTGH_GETDESCRIPTOR_DEVICE[]; 
	extern UINT8 OTGH_GETDESCRIPTOR_CONFIG[]; 
	extern UINT8 OTGH_SETADDRESS[]; 
	extern UINT8 OTGH_SETCONFIGURATION[];
	extern UINT8 OTGH_SET_FEATURE_OTG[];	
	extern UINT8 OTGH_SETDESCRIPTOR_DEVICE[]; //Set Device Descriptor
	extern UINT8 OTGH_GETDESCRIPTOR_STR70[]; //Get String80 Descriptor
	extern UINT8 OTGH_SETDESCRIPTOR_STR70[]; //Set String80 Descriptor
	extern UINT8 OTGH_GETDESCRIPTOR_STR80[]; //Get String80 Descriptor
	extern UINT8 OTGH_SETDESCRIPTOR_STR80[]; //Set String80 Descriptor
    
#endif //HOST20_AP_HUB__H


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -