1*53ee8cc1Swenshuai.xi //<MStar Software> 2*53ee8cc1Swenshuai.xi //****************************************************************************** 3*53ee8cc1Swenshuai.xi // MStar Software 4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are 6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties. 8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all 9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written 10*53ee8cc1Swenshuai.xi // permission has been granted by MStar. 11*53ee8cc1Swenshuai.xi // 12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you 13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to 14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations: 15*53ee8cc1Swenshuai.xi // 16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar 17*53ee8cc1Swenshuai.xi // Software and any modification/derivatives thereof. 18*53ee8cc1Swenshuai.xi // No right, ownership, or interest to MStar Software and any 19*53ee8cc1Swenshuai.xi // modification/derivatives thereof is transferred to you under Terms. 20*53ee8cc1Swenshuai.xi // 21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be 22*53ee8cc1Swenshuai.xi // supplied together with third party`s software and the use of MStar 23*53ee8cc1Swenshuai.xi // Software may require additional licenses from third parties. 24*53ee8cc1Swenshuai.xi // Therefore, you hereby agree it is your sole responsibility to separately 25*53ee8cc1Swenshuai.xi // obtain any and all third party right and license necessary for your use of 26*53ee8cc1Swenshuai.xi // such third party`s software. 27*53ee8cc1Swenshuai.xi // 28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29*53ee8cc1Swenshuai.xi // MStar`s confidential information and you agree to keep MStar`s 30*53ee8cc1Swenshuai.xi // confidential information in strictest confidence and not disclose to any 31*53ee8cc1Swenshuai.xi // third party. 32*53ee8cc1Swenshuai.xi // 33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34*53ee8cc1Swenshuai.xi // kind. Any warranties are hereby expressly disclaimed by MStar, including 35*53ee8cc1Swenshuai.xi // without limitation, any warranties of merchantability, non-infringement of 36*53ee8cc1Swenshuai.xi // intellectual property rights, fitness for a particular purpose, error free 37*53ee8cc1Swenshuai.xi // and in conformity with any international standard. You agree to waive any 38*53ee8cc1Swenshuai.xi // claim against MStar for any loss, damage, cost or expense that you may 39*53ee8cc1Swenshuai.xi // incur related to your use of MStar Software. 40*53ee8cc1Swenshuai.xi // In no event shall MStar be liable for any direct, indirect, incidental or 41*53ee8cc1Swenshuai.xi // consequential damages, including without limitation, lost of profit or 42*53ee8cc1Swenshuai.xi // revenues, lost or damage of data, and unauthorized system use. 43*53ee8cc1Swenshuai.xi // You agree that this Section 4 shall still apply without being affected 44*53ee8cc1Swenshuai.xi // even if MStar Software has been modified by MStar in accordance with your 45*53ee8cc1Swenshuai.xi // request or instruction for your use, except otherwise agreed by both 46*53ee8cc1Swenshuai.xi // parties in writing. 47*53ee8cc1Swenshuai.xi // 48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or 49*53ee8cc1Swenshuai.xi // services in relation with MStar Software to you for your use of 50*53ee8cc1Swenshuai.xi // MStar Software in conjunction with your or your customer`s product 51*53ee8cc1Swenshuai.xi // ("Services"). 52*53ee8cc1Swenshuai.xi // You understand and agree that, except otherwise agreed by both parties in 53*53ee8cc1Swenshuai.xi // writing, Services are provided on an "AS IS" basis and the warranty 54*53ee8cc1Swenshuai.xi // disclaimer set forth in Section 4 above shall apply. 55*53ee8cc1Swenshuai.xi // 56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels 57*53ee8cc1Swenshuai.xi // or otherwise: 58*53ee8cc1Swenshuai.xi // (a) conferring any license or right to use MStar name, trademark, service 59*53ee8cc1Swenshuai.xi // mark, symbol or any other identification; 60*53ee8cc1Swenshuai.xi // (b) obligating MStar or any of its affiliates to furnish any person, 61*53ee8cc1Swenshuai.xi // including without limitation, you and your customers, any assistance 62*53ee8cc1Swenshuai.xi // of any kind whatsoever, or any information; or 63*53ee8cc1Swenshuai.xi // (c) conferring any license or right under any intellectual property right. 64*53ee8cc1Swenshuai.xi // 65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws 66*53ee8cc1Swenshuai.xi // of Taiwan, R.O.C., excluding its conflict of law rules. 67*53ee8cc1Swenshuai.xi // Any and all dispute arising out hereof or related hereto shall be finally 68*53ee8cc1Swenshuai.xi // settled by arbitration referred to the Chinese Arbitration Association, 69*53ee8cc1Swenshuai.xi // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70*53ee8cc1Swenshuai.xi // Rules of the Association by three (3) arbitrators appointed in accordance 71*53ee8cc1Swenshuai.xi // with the said Rules. 72*53ee8cc1Swenshuai.xi // The place of arbitration shall be in Taipei, Taiwan and the language shall 73*53ee8cc1Swenshuai.xi // be English. 74*53ee8cc1Swenshuai.xi // The arbitration award shall be final and binding to both parties. 75*53ee8cc1Swenshuai.xi // 76*53ee8cc1Swenshuai.xi //****************************************************************************** 77*53ee8cc1Swenshuai.xi //<MStar Software> 78*53ee8cc1Swenshuai.xi #ifndef _DRVUSB_H_ 79*53ee8cc1Swenshuai.xi #define _DRVUSB_H_ 80*53ee8cc1Swenshuai.xi #include "SW_Config.h" 81*53ee8cc1Swenshuai.xi #include "Board.h" 82*53ee8cc1Swenshuai.xi #if (ENABLE_PWS == 1) 83*53ee8cc1Swenshuai.xi //#define USB_POWER_SAVING_MODE 84*53ee8cc1Swenshuai.xi #endif 85*53ee8cc1Swenshuai.xi 86*53ee8cc1Swenshuai.xi #if ENABLE_DMP 87*53ee8cc1Swenshuai.xi #define USBHOST2PORT //for 2 usb ports board, if you use only one port , please undefine it. 88*53ee8cc1Swenshuai.xi #endif 89*53ee8cc1Swenshuai.xi 90*53ee8cc1Swenshuai.xi 91*53ee8cc1Swenshuai.xi extern void MDrv_USB_EnterPowerSaveMode(void); 92*53ee8cc1Swenshuai.xi extern void MDrv_USB_EnterPowerSaveMode_Port2(void); 93*53ee8cc1Swenshuai.xi extern void MDrv_USB_EnterPowerSaveMode_Port3(void); 94*53ee8cc1Swenshuai.xi extern void MDrv_USB_EnterPowerSaveMode_Port4(void); 95*53ee8cc1Swenshuai.xi 96*53ee8cc1Swenshuai.xi 97*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbHost_Init(void); 98*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbHost_Init_Enum(void); 99*53ee8cc1Swenshuai.xi U8 MDrv_USBGetPortEnableStatus(void); 100*53ee8cc1Swenshuai.xi 101*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskRead_Port2 MDrv_UsbBlockReadToMIU_Port2 102*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskWrite_Port2 MDrv_UsbBlockWriteFromMIU_Port2 103*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockReadToMIU_Port2(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 104*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockWriteFromMIU_Port2(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 105*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbDeviceConnect_Port2(void); 106*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_MAX_LUN_PORT2(void); 107*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_VALID_LUN_PORT2(void); 108*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_Usb_Device_Enum_Port2(void); 109*53ee8cc1Swenshuai.xi extern U8 MDrv_Usb_Device_Enum_EX_Port2(void); 110*53ee8cc1Swenshuai.xi extern void MDrv_UsbClose_Port2(void); 111*53ee8cc1Swenshuai.xi extern void MDrv_USB_Init_Port2(U32); 112*53ee8cc1Swenshuai.xi extern U8 MDrv_UsbGetMaxLUNCount_Port2(void); 113*53ee8cc1Swenshuai.xi extern void MDrv_EjectUsbDevice_Port2(void); 114*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockSize_Port2(U8 lun); 115*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockNum_Port2(U8 lun); 116*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbHost_Init_Enum_Port2(void); 117*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceStatusPort2(void); 118*53ee8cc1Swenshuai.xi void MDrv_SetUsbDeviceStatus_Port2(U8 status); 119*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceType_Port2(void); 120*53ee8cc1Swenshuai.xi void MDrv_GetUsbString_Port2(U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 121*53ee8cc1Swenshuai.xi U8* MDrv_Get_HID_Report_Raw_Data_Port2(void); 122*53ee8cc1Swenshuai.xi U8 MDrv_USBGetqTDTimeoutValue_Port2(void); 123*53ee8cc1Swenshuai.xi void MDrv_USBSetqTDTimeoutValue_Port2(U8 u8Value); 124*53ee8cc1Swenshuai.xi U8 MDrv_USBGetIORetryCount_Port2(void); 125*53ee8cc1Swenshuai.xi void MDrv_USBSetIORetryCount_Port2(U8 u8Value); 126*53ee8cc1Swenshuai.xi void MDrv_GetUsbStorString_Port2(U8 uLun, U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 127*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestPacket_Port2(void); 128*53ee8cc1Swenshuai.xi void MDrv_UsbSendSE0_Port2(void); 129*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestJ_Port2(void); 130*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestK_Port2(void); 131*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDevInterfaceClass_Port2(void); 132*53ee8cc1Swenshuai.xi 133*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskRead MDrv_UsbBlockReadToMIU 134*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskWrite MDrv_UsbBlockWriteFromMIU 135*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockReadToMIU(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 136*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockWriteFromMIU(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 137*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbDeviceConnect(void); 138*53ee8cc1Swenshuai.xi extern U8 MDrv_UsbGetInterfaceClass(U8 i,U8 j); 139*53ee8cc1Swenshuai.xi extern void MDrv_UsbClose(void); 140*53ee8cc1Swenshuai.xi extern void MDrv_USB_Init(U32); 141*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_Usb_Device_Enum(void); 142*53ee8cc1Swenshuai.xi extern U8 MDrv_Usb_Device_Enum_EX(void); 143*53ee8cc1Swenshuai.xi extern U8 flib_Host20_Enumerate (U8,U8 ); 144*53ee8cc1Swenshuai.xi extern void MDrv_EjectUsbDevice(void); 145*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockSize(U8 lun); 146*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockNum(U8 lun); 147*53ee8cc1Swenshuai.xi 148*53ee8cc1Swenshuai.xi extern U8 MDrv_UsbGetMaxLUNCount(void); 149*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_MAX_LUN(void); 150*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_VALID_LUN(void); 151*53ee8cc1Swenshuai.xi 152*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceStatus(void); 153*53ee8cc1Swenshuai.xi void MDrv_SetUsbDeviceStatus(U8 status); 154*53ee8cc1Swenshuai.xi void MDrv_ClearUsbDeviceStatus(void); 155*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceType(void); 156*53ee8cc1Swenshuai.xi void MDrv_GetUsbString(U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 157*53ee8cc1Swenshuai.xi U16 MDrv_GET_JOYSTICK_STATUS(void); 158*53ee8cc1Swenshuai.xi U8* MDrv_Get_HID_Report_Raw_Data(void); 159*53ee8cc1Swenshuai.xi U8 MDrv_USBGetqTDTimeoutValue(void); 160*53ee8cc1Swenshuai.xi void MDrv_USBSetqTDTimeoutValue(U8 u8Value); 161*53ee8cc1Swenshuai.xi U8 MDrv_USBGetIORetryCount(void); 162*53ee8cc1Swenshuai.xi void MDrv_USBSetIORetryCount(U8 u8Value); 163*53ee8cc1Swenshuai.xi BOOLEAN MDrv_USBGetPortAutoSwitchStatus(void); 164*53ee8cc1Swenshuai.xi void MDrv_USBSetPortAutoSwitchStatus(BOOLEAN bEnable); 165*53ee8cc1Swenshuai.xi void MDrv_USBSetPortSwitch(U8 uPort); 166*53ee8cc1Swenshuai.xi void MDrv_GetUsbStorString(U8 uLun, U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 167*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestPacket(void); 168*53ee8cc1Swenshuai.xi void MDrv_UsbSendSE0(void); 169*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestJ(void); 170*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestK(void); 171*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDevInterfaceClass(void); 172*53ee8cc1Swenshuai.xi 173*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskRead_Port3 MDrv_UsbBlockReadToMIU_Port3 174*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskWrite_Port3 MDrv_UsbBlockWriteFromMIU_Port3 175*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockReadToMIU_Port3(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 176*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockWriteFromMIU_Port3(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 177*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbDeviceConnect_Port3(void); 178*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_MAX_LUN_PORT3(void); 179*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_VALID_LUN_PORT3(void); 180*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_Usb_Device_Enum_Port3(void); 181*53ee8cc1Swenshuai.xi extern U8 MDrv_Usb_Device_Enum_EX_Port3(void); 182*53ee8cc1Swenshuai.xi extern void MDrv_UsbClose_Port3(void); 183*53ee8cc1Swenshuai.xi extern void MDrv_USB_Init_Port3(U32); 184*53ee8cc1Swenshuai.xi extern U8 MDrv_UsbGetMaxLUNCount_Port3(void); 185*53ee8cc1Swenshuai.xi extern void MDrv_EjectUsbDevice_Port3(void); 186*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockSize_Port3(U8 lun); 187*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockNum_Port3(U8 lun); 188*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbHost_Init_Enum_Port3(void); 189*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceStatusPort3(void); 190*53ee8cc1Swenshuai.xi void MDrv_SetUsbDeviceStatus_Port3(U8 status); 191*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceType_Port3(void); 192*53ee8cc1Swenshuai.xi void MDrv_GetUsbString_Port3(U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 193*53ee8cc1Swenshuai.xi U8* MDrv_Get_HID_Report_Raw_Data_Port3(void); 194*53ee8cc1Swenshuai.xi U8 MDrv_USBGetqTDTimeoutValue_Port3(void); 195*53ee8cc1Swenshuai.xi void MDrv_USBSetqTDTimeoutValue_Port3(U8 u8Value); 196*53ee8cc1Swenshuai.xi U8 MDrv_USBGetIORetryCount_Port3(void); 197*53ee8cc1Swenshuai.xi void MDrv_USBSetIORetryCount_Port3(U8 u8Value); 198*53ee8cc1Swenshuai.xi void MDrv_GetUsbStorString_Port3(U8 uLun, U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 199*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestPacket_Port3(void); 200*53ee8cc1Swenshuai.xi void MDrv_UsbSendSE0_Port3(void); 201*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestJ_Port3(void); 202*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestK_Port3(void); 203*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDevInterfaceClass_Port3(void); 204*53ee8cc1Swenshuai.xi 205*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskRead_Port4 MDrv_UsbBlockReadToMIU_Port4 206*53ee8cc1Swenshuai.xi #define MDrv_UsbDiskWrite_Port4 MDrv_UsbBlockWriteFromMIU_Port4 207*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockReadToMIU_Port4(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 208*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbBlockWriteFromMIU_Port4(U8 lun,U32 u32BlockAddr, U32 u32BlockNum,U32 u32Buffer); 209*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbDeviceConnect_Port4(void); 210*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_MAX_LUN_PORT4(void); 211*53ee8cc1Swenshuai.xi U8 MDrv_GET_MASS_VALID_LUN_PORT4(void); 212*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_Usb_Device_Enum_Port4(void); 213*53ee8cc1Swenshuai.xi extern U8 MDrv_Usb_Device_Enum_EX_Port4(void); 214*53ee8cc1Swenshuai.xi extern void MDrv_UsbClose_Port4(void); 215*53ee8cc1Swenshuai.xi extern void MDrv_USB_Init_Port4(U32); 216*53ee8cc1Swenshuai.xi extern U8 MDrv_UsbGetMaxLUNCount_Port4(void); 217*53ee8cc1Swenshuai.xi extern void MDrv_EjectUsbDevice_Port4(void); 218*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockSize_Port4(U8 lun); 219*53ee8cc1Swenshuai.xi U32 MDrv_GetUsbBlockNum_Port4(U8 lun); 220*53ee8cc1Swenshuai.xi extern BOOLEAN MDrv_UsbHost_Init_Enum_Port4(void); 221*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceStatusPort4(void); 222*53ee8cc1Swenshuai.xi void MDrv_SetUsbDeviceStatus_Port4(U8 status); 223*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDeviceType_Port4(void); 224*53ee8cc1Swenshuai.xi void MDrv_GetUsbString_Port4(U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 225*53ee8cc1Swenshuai.xi U8* MDrv_Get_HID_Report_Raw_Data_Port4(void); 226*53ee8cc1Swenshuai.xi U8 MDrv_USBGetqTDTimeoutValue_Port4(void); 227*53ee8cc1Swenshuai.xi void MDrv_USBSetqTDTimeoutValue_Port4(U8 u8Value); 228*53ee8cc1Swenshuai.xi U8 MDrv_USBGetIORetryCount_Port4(void); 229*53ee8cc1Swenshuai.xi void MDrv_USBSetIORetryCount_Port4(U8 u8Value); 230*53ee8cc1Swenshuai.xi void MDrv_GetUsbStorString_Port4(U8 uLun, U8 u8StrID, S8 *pStrBuf, U8 u8BufLen); 231*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestPacket_Port4(void); 232*53ee8cc1Swenshuai.xi void MDrv_UsbSendSE0_Port4(void); 233*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestJ_Port4(void); 234*53ee8cc1Swenshuai.xi void MDrv_UsbSendTestK_Port4(void); 235*53ee8cc1Swenshuai.xi U8 MDrv_GetUsbDevInterfaceClass_Port4(void); 236*53ee8cc1Swenshuai.xi 237*53ee8cc1Swenshuai.xi #define USB_NOT_RESPONSE 0xff 238*53ee8cc1Swenshuai.xi #define USB_INTERFACE_CLASS_NONE 0 239*53ee8cc1Swenshuai.xi #define USB_INTERFACE_CLASS_MSD 0x08 240*53ee8cc1Swenshuai.xi #define USB_INTERFACE_CLASS_HUB 0x09 241*53ee8cc1Swenshuai.xi #define USB_INTERFACE_CLASS_IMAGE 0x06 242*53ee8cc1Swenshuai.xi #define USB_INTERFACE_CLASS_HID 0x03 243*53ee8cc1Swenshuai.xi 244*53ee8cc1Swenshuai.xi 245*53ee8cc1Swenshuai.xi //Chip ID deifinition 246*53ee8cc1Swenshuai.xi #define CHIPID_NEPTUNE 0x2 247*53ee8cc1Swenshuai.xi #define CHIPID_ERIS 0x3 248*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA 0x4 249*53ee8cc1Swenshuai.xi #define CHIPID_PLUTO 0x5 250*53ee8cc1Swenshuai.xi #define CHIPID_TRITON 0x6 251*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA2 0xB 252*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA3 0xF 253*53ee8cc1Swenshuai.xi #define CHIPID_EUCLID 0x15 254*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA4 0x18 255*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA7 0x1C 256*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA8 0x1F 257*53ee8cc1Swenshuai.xi #define CHIPID_TITANIA9 0x23 258*53ee8cc1Swenshuai.xi #define CHIPID_JANUS 0x1D 259*53ee8cc1Swenshuai.xi 260*53ee8cc1Swenshuai.xi // project code definition 261*53ee8cc1Swenshuai.xi #define JUPITER 0 262*53ee8cc1Swenshuai.xi #define NEPTUNE 1 263*53ee8cc1Swenshuai.xi #define RAPHAEL 2 264*53ee8cc1Swenshuai.xi #define ERIS 3 265*53ee8cc1Swenshuai.xi 266*53ee8cc1Swenshuai.xi #define NO_DEVICE 0 267*53ee8cc1Swenshuai.xi #define USB11_DEVICE 1 268*53ee8cc1Swenshuai.xi #define USB20_DEVICE 2 269*53ee8cc1Swenshuai.xi #define BAD_DEVICE 3 270*53ee8cc1Swenshuai.xi #define CONNECT_DEVICE 4 271*53ee8cc1Swenshuai.xi #define POWER_SAVING 5 272*53ee8cc1Swenshuai.xi #define WAIT_INIT 6 273*53ee8cc1Swenshuai.xi 274*53ee8cc1Swenshuai.xi #define USB_PORT_0 0 275*53ee8cc1Swenshuai.xi #define USB_PORT_2 1 276*53ee8cc1Swenshuai.xi #define USB_PORT_3 2 277*53ee8cc1Swenshuai.xi #define USB_PORT_4 3 278*53ee8cc1Swenshuai.xi 279*53ee8cc1Swenshuai.xi #define USB_STR_VENDOR 1 280*53ee8cc1Swenshuai.xi #define USB_STR_PRODUCT 2 281*53ee8cc1Swenshuai.xi 282*53ee8cc1Swenshuai.xi enum // for return value of MDrv_Usb_Device_Enum_EX() 283*53ee8cc1Swenshuai.xi { 284*53ee8cc1Swenshuai.xi DEVENUM_OK = 0, 285*53ee8cc1Swenshuai.xi DEVENUM_INPROGRESS, 286*53ee8cc1Swenshuai.xi DEVENUM_FAIL 287*53ee8cc1Swenshuai.xi }; 288*53ee8cc1Swenshuai.xi #endif 289