GpioUser.h 3.81 KB
Newer Older
1 2 3
#ifndef _GPIOUSER_H_
#define _GPIOUSER_H_

4 5
#define GpioOut_High RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH
#define GpioOut_Low RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW
6
/* GPIO映射 */
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
// #define L_Fuel_POW                RTE_GPIO_PORT00_PIN00   
#define KL15_AD_IN                RTE_GPIO_PORT00_PIN01   
#define SD_1                       RTE_GPIO_PORT00_PIN02   
#define CSB_1                      RTE_GPIO_PORT00_PIN03   
#define SCL_1                      RTE_GPIO_PORT00_PIN04   
#define Switch_E                  RTE_GPIO_PORT00_PIN05   
#define Switch_D                  RTE_GPIO_PORT00_PIN06   

#define Backlight                 RTE_GPIO_PORT01_PIN00   
#define RXD_ESP                   RTE_GPIO_PORT01_PIN01   
#define TXD_ESP                   RTE_GPIO_PORT01_PIN02   
//#define RXD_ESP            RTE_GPIO_PORT01_PIN03   
// #define SCL_IIC                   RTE_GPIO_PORT01_PIN04   
#define TotalWork_hours1000_MCU_OUT     RTE_GPIO_PORT01_PIN05   
#define TotalWork_hours110_MCU_OUT      RTE_GPIO_PORT01_PIN06   
#define Interaction_indicator     RTE_GPIO_PORT01_PIN07   

#define AVDD                      RTE_GPIO_PORT02_PIN00   
#define GND                       RTE_GPIO_PORT02_PIN01   
#define KL30_AD_MCU_IN            RTE_GPIO_PORT02_PIN02   
#define KL15_AD_MCU_IN            RTE_GPIO_PORT02_PIN03   
#define Power_level10_MCU_OUT     RTE_GPIO_PORT02_PIN04   
// #define Fuel_AD_IN_MCU            RTE_GPIO_PORT02_PIN05   
// #define Water_Temperature         RTE_GPIO_PORT02_PIN06   
// #define BiasBitSW_Fuel            RTE_GPIO_PORT02_PIN07   

#define Power_level100_MCU_OUT    RTE_GPIO_PORT03_PIN00   
#define SDB_LED_DRIVER            RTE_GPIO_PORT03_PIN01   

#define SWDIO                     RTE_GPIO_PORT04_PIN00   
#define OUT_EN_1                  RTE_GPIO_PORT04_PIN01   
#define OUT_ST                    RTE_GPIO_PORT04_PIN02   
#define OUT_EN                    RTE_GPIO_PORT04_PIN03   

#define CAN_MCU_RXD               RTE_GPIO_PORT05_PIN00   
#define CAN_MCU_TXD               RTE_GPIO_PORT05_PIN01   
#define CAN_STB_MCU               RTE_GPIO_PORT05_PIN02   
// #define Right_Turn                RTE_GPIO_PORT05_PIN03   
// #define Left_Turn                 RTE_GPIO_PORT05_PIN04   
// #define High_Beam                 RTE_GPIO_PORT05_PIN05   

#define IIC_SCL_24G16                       RTE_GPIO_PORT06_PIN00   
#define IIC_SDA_24G16                       RTE_GPIO_PORT06_PIN01   
#define IIC_SCL_27030                   RTE_GPIO_PORT06_PIN02   
#define IIC_SDA_27030                   RTE_GPIO_PORT06_PIN03   

#define SD_2                       RTE_GPIO_PORT07_PIN00   
#define CSB_2                      RTE_GPIO_PORT07_PIN01   
#define SCL_2                      RTE_GPIO_PORT07_PIN02   
#define Switch_C                   RTE_GPIO_PORT07_PIN03   
#define Switch_B                   RTE_GPIO_PORT07_PIN04   
#define Switch_A                   RTE_GPIO_PORT07_PIN05   
#define Grass_Full                 RTE_GPIO_PORT07_PIN06   
#define Headlights_start           RTE_GPIO_PORT07_PIN07   

#define L_BiasBitSW_POW            RTE_GPIO_PORT12_PIN00 
#define X_1                        RTE_GPIO_PORT12_PIN01 
#define X_2                        RTE_GPIO_PORT12_PIN02 
#define XT_1                       RTE_GPIO_PORT12_PIN03 
#define XT_2                       RTE_GPIO_PORT12_PIN04 

#define NONE_2                    RTE_GPIO_PORT13_PIN00 
#define Neutral                   RTE_GPIO_PORT13_PIN06 
#define SWCLK                     RTE_GPIO_PORT13_PIN07 

#define L_BD433Ctrl_OUT           RTE_GPIO_PORT14_PIN00 
#define L_BiasBitSW_Fuel_OUT      RTE_GPIO_PORT14_PIN01 
#define A_Version                 RTE_GPIO_PORT14_PIN06 
#define NONE_1                    RTE_GPIO_PORT14_PIN07 
76 77 78 79 80 81 82 83 84 85 86 87

typedef enum
{
    Gpio_KL30_Init = 0,
    Gpio_WakeUp_Init,
    Gpio_Sleep_Init,
    Gpio_Uvalid,
}_GpioUser_Enum;

extern void Gpio_Init(_GpioUser_Enum InitMode);

#endif