GpioUser.h 3.86 KB
Newer Older
时昊's avatar
时昊 committed
1 2 3 4 5 6
#ifndef _GPIOUSER_H_
#define _GPIOUSER_H_

#define GpioOut_High RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH
#define GpioOut_Low RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW
/* GPIO映射 */
时昊's avatar
时昊 committed
7 8 9 10 11 12 13
#define ABS_Faulty_lights          RTE_GPIO_PORT00_PIN00   
#define KL15_AD_IN                 RTE_GPIO_PORT00_PIN01   
#define MCU_SPI_MOSI               RTE_GPIO_PORT00_PIN02   
#define MCU_SPI_MISO               RTE_GPIO_PORT00_PIN03   
#define MCU_SPI_CLK                RTE_GPIO_PORT00_PIN04   
#define HighBeam_P_In              RTE_GPIO_PORT00_PIN05   
#define VSPEED_TEN_OUT             RTE_GPIO_PORT00_PIN06   
时昊's avatar
时昊 committed
14

时昊's avatar
时昊 committed
15 16 17 18 19 20 21 22
#define Blacklight_PWM             RTE_GPIO_PORT01_PIN00   //ljs
#define LIN_RXD_ESP                RTE_GPIO_PORT01_PIN01   
#define LIN_TXD_ESP                RTE_GPIO_PORT01_PIN02   
#define Gears_N_MCU                RTE_GPIO_PORT01_PIN03   
#define Low_oil_pressure_MCU       RTE_GPIO_PORT01_PIN04   
#define x1530_EN_MCU               RTE_GPIO_PORT01_PIN05   
#define ESPEED_TEN_IN              RTE_GPIO_PORT01_PIN06   
#define VSPEED_TEN_IN              RTE_GPIO_PORT01_PIN07   
时昊's avatar
时昊 committed
23

时昊's avatar
时昊 committed
24 25 26 27 28 29 30 31
#define AVDD                       RTE_GPIO_PORT02_PIN00   
#define GND                        RTE_GPIO_PORT02_PIN01   
#define KL30_AD_MCU_IN             RTE_GPIO_PORT02_PIN02     //ljs 
#define KL15_AD_MCU_IN             RTE_GPIO_PORT02_PIN03     //ljs
#define A_NTC_IN                   RTE_GPIO_PORT02_PIN04   
#define A_FuelSender_BitSNSR1_IN   RTE_GPIO_PORT02_PIN05   
#define A_WaterTemp_IN             RTE_GPIO_PORT02_PIN06   
#define A_FULESTANDARDBitSW1_IN    RTE_GPIO_PORT02_PIN07   
时昊's avatar
时昊 committed
32

时昊's avatar
时昊 committed
33 34
#define MAINTENANCE_LAMP_OUT       RTE_GPIO_PORT03_PIN00   
#define LeftTurn_MUC_OUT           RTE_GPIO_PORT03_PIN01   
时昊's avatar
时昊 committed
35

时昊's avatar
时昊 committed
36 37
#define SWDIO_JTMS                 RTE_GPIO_PORT04_PIN00   
#define Start_stop_MCU             RTE_GPIO_PORT04_PIN01   
时昊's avatar
时昊 committed
38
#define KEY_SELECT_MCU             RTE_GPIO_PORT04_PIN02   
时昊's avatar
时昊 committed
39
#define VCC1V2_AMT_EN              RTE_GPIO_PORT04_PIN03      //ljs
时昊's avatar
时昊 committed
40

时昊's avatar
时昊 committed
41 42 43 44 45
#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 HighBeam_MCU               RTE_GPIO_PORT05_PIN03   
#define L_FuelSender_OUT           RTE_GPIO_PORT05_PIN04   
时昊's avatar
时昊 committed
46
#define KEY_OK_MCU                 RTE_GPIO_PORT05_PIN05   
时昊's avatar
时昊 committed
47

时昊's avatar
时昊 committed
48 49 50 51
#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 I243_SDA_27030             RTE_GPIO_PORT06_PIN03   
时昊's avatar
时昊 committed
52 53 54 55

#define SCL_2                      RTE_GPIO_PORT07_PIN00   
#define CSB_2                      RTE_GPIO_PORT07_PIN01   
#define SD_2                       RTE_GPIO_PORT07_PIN02   
56
#define MCU_RSTB_LCD               RTE_GPIO_PORT07_PIN03       //ljs
时昊's avatar
时昊 committed
57
#define HighBeam_MUC_OUT           RTE_GPIO_PORT07_PIN04   
58 59 60
#define STBYB_LCD_MCU              RTE_GPIO_PORT07_PIN05       //ljs
#define RXD_2                      RTE_GPIO_PORT07_PIN06       //ljs
#define TXD_2                      RTE_GPIO_PORT07_PIN07       //ljs
时昊's avatar
时昊 committed
61

时昊's avatar
时昊 committed
62 63 64 65 66
#define L_BiasBitSW_POW            RTE_GPIO_PORT12_PIN00 
#define MCU_XI                     RTE_GPIO_PORT12_PIN01 
#define MCU_XO                     RTE_GPIO_PORT12_PIN02 
#define X32768_IN                  RTE_GPIO_PORT12_PIN03 
#define X32768_OUT                 RTE_GPIO_PORT12_PIN04 
时昊's avatar
时昊 committed
67

时昊's avatar
时昊 committed
68 69 70
#define MCU_SPI_CS                 RTE_GPIO_PORT13_PIN00 
#define RESEVER5_OUT_LOW           RTE_GPIO_PORT13_PIN06 
#define SWCLK                      RTE_GPIO_PORT13_PIN07 
时昊's avatar
时昊 committed
71

时昊's avatar
时昊 committed
72 73 74 75
#define VCC_33_EN_MCU              RTE_GPIO_PORT14_PIN00        //ljs
#define RightTurn_MUC_OUT          RTE_GPIO_PORT14_PIN01 
#define A_Version                  RTE_GPIO_PORT14_PIN06 
#define Engine_Failure_MCU         RTE_GPIO_PORT14_PIN07 
时昊's avatar
时昊 committed
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