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

📄 lib_host20.h

📁 GM8120 linux driver.
💻 H
📖 第 1 页 / 共 3 页
字号:
   Periodic_Frame_List_Cell_Structure   sCell[Host20_Preiodic_Frame_List_MAX]; } Periodic_Frame_List_Structure;	                                                                //<3.1>iTD Structure Definition**************************************** typedef struct _iTD_Status {          //<1>.Next_Link_Pointer Word      UINT32   bOffset:12;                   UINT32   bPageSelect:3;                   UINT32   bInterruptOnComplete:1;       UINT32   bLength:12;                   UINT32   bStatus:4;                              } iTD_Status_Structure;    #define HOST20_iTD_Status_Active              0x08    #define HOST20_iTD_Status_DataBufferError     0x04    #define HOST20_iTD_Status_BabbleDetect        0x02    #define HOST20_iTD_Status_TransctionError     0x01 typedef struct _iTD_BufferPointer {          //<1>.Next_Link_Pointer Word      UINT32   bMultiFunction:12;           UINT32   bBufferPointer:20;            } iTD_BufferPointer_Structure; typedef struct _iTD {          //<1>.Next_Link_Pointer Word      UINT32   bTerminate:1;            UINT32   bType:2;                 UINT32   bReserve_1:2;            UINT32   bNextLinkPointer:27;                      //<2>.Status Word     iTD_Status_Structure   ArrayStatus_Word[8];              //<3>.Buffer_Pointer Word          iTD_BufferPointer_Structure   ArrayBufferPointer_Word[7];                      } iTD_Structure; //<3.2>siTD Structure Definition**************************************** typedef struct _siTD {          //<1>.1 Word      UINT32   bTerminate:1;                 UINT32   bType:2;                           UINT32   bReserve_1:2;                 UINT32   bNextQHDPointer:27;                          //<2>.2 Word      UINT32   bDeviceAddress:7;             UINT32   bReserve_21:1;                    UINT32   bEdNumber:4;                  UINT32   bReserve_22:4;                UINT32   bHubAddr:7;                   UINT32   bReserve_23:1;                     UINT32   bPortNumber:7;                UINT32   bInOut:1;                    //<3>.3 Word           UINT32   bS_Mask:8;                          UINT32   bC_Mask:8;                         UINT32   bReserve_31:16;                    //<4>.4 Word           UINT32   bStatus:8;           UINT32   bC_Prog_Mask:8;                UINT32   bTotalBytesToTransfer:10;                UINT32   bReserve_41:4;          UINT32   bPageSelect:1;               UINT32   bInterruptOnComplete:1;              //<5>.5 Word           UINT32   bCurrentOffset:12;         UINT32   bBufferPointer_Page0:20;               //<6>.6 Word           UINT32   bT_Count:3;         UINT32   bTransactionPosition:2;      UINT32   bReserve_61:7;               UINT32   bBufferPointer_Page1:20;            //<6>.7 Word           UINT32   bBP_Terminate:1;         UINT32   bReserve_71:4;        UINT32   bBackPointer:27;             } siTD_Structure;    #define HOST20_siTD_Status_Active              0x80    #define HOST20_siTD_TP_All                     0x00    #define HOST20_siTD_TP_Begin                   0x01    #define HOST20_siTD_TP_Mid                     0x02    #define HOST20_siTD_TP_End                     0x03//<3.2>qTD Structure Definition****************************************  typedef struct _qTD {          //<1>.Next_qTD_Pointer Word      UINT32   bTerminate:1;              UINT32   bReserve_1:4;              UINT32   bNextQTDPointer:27;                        //<2>.Alternate Next qTD Word      UINT32   bAlternateTerminate:1;          UINT32   bReserve_2:4;                   UINT32   bAlternateQTDPointer:27;            //<3>.Status Word           UINT32   bStatus_PingState:1;               UINT32   bStatus_SplitState:1;              UINT32   bStatus_MissMicroFrame:1;          UINT32   bStatus_Transaction_Err:1;         UINT32   bStatus_Babble:1;                  UINT32   bStatus_Buffer_Err:1;              UINT32   bStatus_Halted:1;                  UINT32   bStatus_Active:1;                         UINT32   bPID:2;                        UINT32   bErrorCounter:2;               UINT32   CurrentPage:3;                 UINT32   bInterruptOnComplete:1;        UINT32   bTotalBytes:15;                UINT32   bDataToggle:1;                //<4>.Buffer Pointer Word Array          UINT32   ArrayBufferPointer_Word[5];        } qTD_Structure;    #define HOST20_qTD_PID_OUT                  0x00    #define HOST20_qTD_PID_IN                   0x01    #define HOST20_qTD_PID_SETUP                0x02        #define HOST20_qTD_STATUS_Active            0x80    #define HOST20_qTD_STATUS_Halted            0x40    #define HOST20_qTD_STATUS_BufferError       0x20    #define HOST20_qTD_STATUS_Babble            0x10    #define HOST20_qTD_STATUS_TransactionError  0x08    #define HOST20_qTD_STATUS_MissMicroFrame    0x04    #define HOST20_qTD_STATUS_Split             0x02    #define HOST20_qTD_STATUS_Ping              0x01//<3.3>qHD Structure Definition**************************************** typedef struct _qHD {          //<1>.Next_qHD_Pointer Word      UINT32   bTerminate:1;                       UINT32   bType:2;                                      UINT32   bReserve_1:2;                         UINT32   bNextQHDPointer:27;                                   //<2>.qHD_2 Word      UINT32   bDeviceAddress:7;                   UINT32   bInactiveOnNextTransaction:1;             UINT32   bEdNumber:4;                         UINT32   bEdSpeed:2;                          UINT32   bDataToggleControl:1;               UINT32   bHeadOfReclamationListFlag:1;       UINT32   bMaxPacketSize:11;                  UINT32   bControlEdFlag:1;                   UINT32   bNakCounter:4;                     //<3>.qHD_3 Word           UINT32   bInterruptScheduleMask:8;           UINT32   bSplitTransactionMask:8;            UINT32   bHubAddr:7;                         UINT32   bPortNumber:7;                      UINT32   bHighBandwidth:2;                  //<4>.Overlay_CurrentqTD           UINT32   bOverlay_CurrentqTD;            //<5>.Overlay_NextqTD           UINT32   bOverlay_NextTerminate:1;           UINT32   bOverlay_Reserve2:4;                     UINT32   bOverlay_NextqTD:27;               //<6>.Overlay_AlternateNextqTD           UINT32   bOverlay_AlternateNextTerminate:1;       UINT32   bOverlay_NanCnt:4;                        UINT32   bOverlay_AlternateqTD:27;               //<7>.Overlay_TotalBytes           UINT32   bOverlay_Status:8;                    UINT32   bOverlay_PID:2;                         UINT32   bOverlay_ErrorCounter:2;              UINT32   bOverlay_C_Page:3;                    UINT32   bOverlay_InterruptOnComplete:1;       UINT32   bOverlay_TotalBytes:15;               UINT32   bOverlay_Direction:1;                //<8>.Overlay_BufferPointer0           UINT32   bOverlay_CurrentOffset:12;           UINT32   bOverlay_BufferPointer_0:20;        //<9>.Overlay_BufferPointer1           UINT32   bOverlay_C_Prog_Mask:8;               UINT32   bOverlay_Reserve3:4;                  UINT32   bOverlay_BufferPointer_1:20;               //<10>.Overlay_BufferPointer2           UINT32   bOverlay_FrameTag:5;                  UINT32   bOverlay_S_Bytes:7;                   UINT32   bOverlay_BufferPointer_2:20;               //<11>.Overlay_BufferPointer3           UINT32   bOverlay_Reserve4:12;                 UINT32   bOverlay_BufferPointer_3:20;               //<12>.Overlay_BufferPointer4           UINT32   bOverlay_Reserve5:12;                 UINT32   bOverlay_BufferPointer_4:20;               } qHD_Structure;    #define HOST20_HD_Type_iTD                  0x00    #define HOST20_HD_Type_QH                   0x01    #define HOST20_HD_Type_siTD                 0x02    #define HOST20_HD_Type_FSTN                 0x03//<3.4>.Test Condition Definition**************************************** typedef struct {           UINT8   bStructureEnable; //Enable = 0x66  Disable=>Others      UINT8   bInterruptThreshod;  //01,02,04,08,10,20,40                      UINT8   bAsynchronousParkMode; //00=>Disable,01=>Enable           UINT8   bAsynchronousParkModeCounter; //01,02,03               UINT8   bFrameSize; //00,01,02            } Host20_Init_Condition_Structure;    #define HOST20_FrameSize_1024                  0x00    #define HOST20_FrameSize_512                   0x01    #define HOST20_FrameSize_256                   0x02//<3.5>.Host20's Attach Device Info Structure****************************************//OTGHost Device Structure typedef struct {		UINT8 bDEVICE_LENGTH;					// bLength	UINT8 bDT_DEVICE;						// bDescriptorType	UINT8 bVerLowByte;			            // bcdUSB	UINT8 bVerHighByte;		UINT8 bDeviceClass;			            // bDeviceClass	UINT8 bDeviceSubClass;			        // bDeviceSubClas;	UINT8 bDeviceProtocol;			        // bDeviceProtocol	UINT8 bEP0MAXPACKETSIZE;				// bMaxPacketSize0		UINT8 bVIDLowByte;			            // idVendor	UINT8 bVIDHighByte;	UINT8 bPIDLowByte;			            // idProduct	UINT8 bPIDHighByte;	UINT8 bRNumLowByte;	                    // bcdDeviceReleaseNumber	UINT8 bRNumHighByte;	UINT8 bManufacturer;			        // iManufacturer	UINT8 bProduct;				            // iProduct	UINT8 bSerialNumber; 			        // iSerialNumber	UINT8 bCONFIGURATION_NUMBER;			// bNumConfigurations		 }OTGH_Descriptor_Device_Struct;//<3.6>.OTGHost Configuration Structure => Only Support 2 Configuration / 5 Interface / 1 Class / 5 Endpoint /1 OTG

⌨️ 快捷键说明

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