#ifndef __GPIO_PIN_DEFINE_H__ #define __GPIO_PIN_DEFINE_H__ typedef enum{ GPIO_0 = 0, GPIO_1, GPIO_2, GPIO_3, GPIO_4, GPIO_5, GPIO_6, GPIO_7, GPIO_8, GPIO_9, GPIO_10, GPIO_11, GPIO_12, GPIO_13, GPIO_14, GPIO_15, GPIO_16, GPIO_17, GPIO_18, GPIO_19, GPIO_20, GPIO_21, GPIO_22, GPIO_23, GPIO_24, GPIO_25, GPIO_26, GPIO_27, GPIO_28, GPIO_29, GPIO_30, GPIO_31, GPIO_32, GPIO_33, GPIO_34, GPIO_35, GPIO_36, GPIO_37, GPIO_38, GPIO_39, GPIO_40, GPIO_41, GPIO_42, GPIO_43, GPIO_44, GPIO_45, GPIO_46, GPIO_47, GPIO_48, GPIO_49, GPIO_50, GPIO_51, GPIO_52, GPIO_53, GPIO_54, GPIO_55, GPIO_56, GPIO_57, GPIO_58, GPIO_59, GPIO_60, GPIO_61, GPIO_62, GPIO_63, GPO_TXP4, GPO_TXP9, GPO_TXN4, GPO_TXN9, GPO_TCP2, GPO_TCN2, RM_GPIO_0, RM_GPIO_1, RM_GPIO_2, RM_GPIO_3, RM_GPIO_4, RM_GPIO_5, RM_GPIO_6, RM_GPIO_7, RM_GPIO_8, GPO_IVDD_SEL, GPO_VBUS_EN, GPIO_NOT_USE, }GPIOPin_t; #ifdef CONFIG_SUPPORT_TCON typedef enum{ TCON_MHL_CABLE_EN = GPIO_0, TCON_SPDIFO = GPIO_2, TCON_HDMIA_SDA = GPIO_7, TCON_HDMIA_SCL = GPIO_8, TCON_HDMIC_SDA = GPIO_12, TCON_HDMIC_SCL = GPIO_13, TCON_VGA_HS = GPIO_16, TCON_VGA_VS = GPIO_17, TCON_TCON10 = GPIO_58, TCON_TCON11 = GPIO_59, TCON_TCON12 = GPIO_60, TCON_TCON13 = GPIO_61, TCON_LVA_TXN0 = GPIO_48+0x100, TCON_LVA_TXP0 = GPIO_49+0x100, TCON_LVA_TXN1 = GPIO_50+0x200, TCON_LVA_TXP1 = GPIO_51+0x200, TCON_LVA_TXN2 = GPIO_52+0x400, TCON_LVA_TXP2 = GPIO_53+0x400, TCON_LVA_TXN3 = GPIO_56+0x800, TCON_LVA_TXP3 = GPIO_57+0x800, TCON_LVA_TXN4 = GPIO_56+0x1000, TCON_LVA_TXP4 = GPIO_57+0x1000, TCON_LVB_TXN0 = GPIO_57+0x2000, TCON_LVB_TXP0 = GPIO_56+0x2000, TCON_LVB_TXN1 = GPIO_55+0x4000, TCON_LVB_TXP1 = GPIO_54+0x4000, TCON_LVB_TXN2 = GPIO_53+0x8000, TCON_LVB_TXP2 = GPIO_52+0x8000, TCON_LVB_TXN3 = GPIO_51+0x10000, TCON_LVB_TXP3 = GPIO_50+0x10000, TCON_LVB_TXN4 = GPIO_49+0x20000, TCON_LVB_TXP4 = GPIO_48+0x20000, TCON_LVA_CKN = GPIO_54+0x40000, TCON_LVA_CKP = GPIO_55+0x40000, }TCONPin_t; #endif /* I2S set number */ #define I2S_SET1 0 #define I2S_SET2 1 #define I2S_SET3 2 #define I2S_SET4 3 #define I2S_NOT_USE 4 typedef enum { GPIO_WITHOUT_INVERT = 0, GPIO_INVERT, }GPIOInvert_t; typedef enum { GPIO_LEVEL_LOW = 0, GPIO_LEVEL_HIGH, GPIO_LEVEL_TRI, }GPIOLevel_t; typedef enum { GPIO_FUNC_OFFLEVEL = 0, GPIO_FUNC_ONLEVEL, } GPIOState_t; typedef enum { GPIO_OUTPUT = 0, GPIO_INPUT, GPIO_OPEN_DRAIN, } GPIOAction_t; typedef enum { GPIO_PULLUD_NO, //NO PULL UP/DOWN GPIO_PULLUD_YES, //HAVE PULL UP/DOWN } GPIOInnerPullUDEnable_t; /* This Enum define only use for dirver, app don't care*/ typedef enum { GPIO_PIN_DRIVER_IGNORE = 0xFF, GPIO_PIN_DRIVER_INIT = 0xFE, GPIO_PIN_DEMOD_RESET = 1, GPIO_PIN_DEMOD_STANDBY, GPIO_PIN_PANEL_ON, GPIO_PIN_LEDBL_DETECT, GPIO_PIN_SPI_PROTECT, GPIO_PIN_AMBIGLOW_LED, GPIO_PIN_HP_DETECT, //headphone detect GPIO_PIN_MHL_CD_SENSE_DETECT, GPIO_PIN_HDMISWITCH_SCL, GPIO_PIN_HDMISWITCH_SDA, GPIO_PIN_BACKLIGHT_ON, GPIO_PIN_BACKLIGHT_ADJ_ON, GPIO_PIN_DVD_IROUT, GPIO_PIN_AC_DET, GPIO_PIN_BL_ADJ, GPIO_PIN_USB_EN, GPIO_PIN_USB_ERR, GPIO_PIN_PR_DET, GPIO_PIN_RMII_RESET, GPIO_PIN_LNB_POWER_EN, GPIO_PIN_LNB_POWER_LDROP, GPIO_PIN_LNB_POWER_13_18V, GPIO_PIN_ANDROID_RECOVE, GPIO_PIN_ANDROID_UBOOT, GPIO_PIN_LED_G_PWM, GPIO_PIN_LED_R_PWM, GPIO_PIN_HP_MUTE, GPIO_PIN_AUDIO_LINEIN1, GPIO_PIN_AUDIO_LINEIN2, GPIO_PIN_TCON_12, GPIO_PIN_TCON_EN, GPIO_PIN_WIFI_CTL, GPIO_PIN_EDP_RESET, GPIO_PIN_POWER_CHECK, GPIO_PIN_KEY0_ON, GPIO_PIN_GPIO_I2C_SCL, GPIO_PIN_GPIO_I2C_SDA, } GPIODriverFunc_t; typedef struct { UINT8 Index; // GPIO_0~GPIO_63 UINT8 AuxAction :2; // 0:output; 1: input; 2: open drain UINT8 AuxValue :2; // 0:low; 1:high UINT8 AInternalPU :1; // 0:disable/1:enable pull high UINT8 AInternalPD :1; // 0:disable/1:enable pull low UINT8 :2; // reserved } GPIOAUXConfig_t; typedef struct { UINT8 DriverFunc; //GPIODriverFunc_t UINT8 Index; // GPIO_0~GPIO_63 UINT8 MainAction; // 0: output; 1: input; 2: open drain UINT8 MainInitLevel; // 0:low; 1:high UINT8 MainLevelInvert; // 0: don't invert, set on is high,set off is low; 1: invert, set on is low, set off is high UINT8 MInternalPU; // 0:disable/1:enable pull high UINT8 MInternalPD; // 0:disable/1:enable pull low } GPIOMAINConfig_t; #endif /* __GPIO_PIN_DEFINE_H__ */