diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index e7090c20..ef239c29 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -36,11 +36,15 @@ #define CMD_SET_CAM_3V3_EN_STATE 132 #define CMD_SET_12V_EN_STATE 133 #define CMD_SET_SYSTEM_RESET 202 -#define CMD_SET_WTH_POWER 490 -#define CMD_SET_PULL_POWER 491 -#define CMD_SET_ANGLE_POWER 492 -#define CMD_SET_OTHER_POWER 493 -#define CMD_SET_PIC1_POWER 494 + + +#ifdef USING_N938 + +#define CMD_SET_WTH_POWER 490 +#define CMD_SET_PULL_POWER 491 +#define CMD_SET_ANGLE_POWER 492 +#define CMD_SET_OTHER_POWER 493 +#define CMD_SET_PIC1_POWER 494 #define CMD_SET_485_en0 301 #define CMD_SET_485_en1 302 #define CMD_SET_485_en2 303 @@ -48,8 +52,56 @@ #define CMD_SET_485_en4 305 -#define GPIO_NODE_MP "/dev/mtkgpioctrl" +#define CMD_485_0_DE 156 // 485_0 DE信号 +#define CMD_485_0_PWR_EN 157 // 485_0 电源使能 +#define CMD_485_0_1_DE_EN 171 // 485_0&1DE电平转换芯片使能信号 +#define CMD_485_1_DE 172 // + + +#define CMD_SET_CAM_3V3_EN_STATE 72 // 整板3V3上电使能 +#define CMD_3V3_SWITCH_EN 45 // 整板485_3V3信号电平转换电源使能 + +#define CMD_UART0_EN 73 // 预留UART0电平转换芯片使能 +#define CMD_485_1_PWR_EN 5 // 485_1 电源使能 +#define CMD_485_3_DE 6 // 485_3 DE信号 +#define CMD_485_2_DE 7 // 485_2 DE信号 +#define CMD_485_4_DE 13 // 485_4 DE信号 +#define CMD_NETWORK_PWR_EN 94 // 100M网络电源使能 + +#define CMD_485_2_PWR_EN 92 // 485_2 电源使能 +#define CMD_485_3_PWR_EN 91 // 485_3 电源使能 +#define CMD_485_4_PWR_EN 90 // 485_4 电源使能 + +#define CMD_SEC_EN 27 // 加密芯片上电使能 + +#define CMD_485_2_3_DE_EN 26 // 485_2&3 DE电平转换芯片使能信号 + +#define CMD_5V_PWR_EN 14 // 整板5V0上电使能 + +#define CMD_SD_CARD_DECT 15 // SD CARD DECT + +#define CMD_PIC1_EN 16 + +#define CMD_OTHER_EN 21 +#define CMD_ANGLE_EN 22 +#define CMD_PULL_EN 23 +#define CMD_WEATHER_EN 24 + +#define CMD_LED_CTRL 46 +#define CMD_BD_EN 47 +#define CMD_ADC_EN 44 + +#define CMD_SPI_PWR_EN 43 // SPI转串口电源使能 + + +#endif // USING_N938 + +#ifdef USING_N938 #define GPIO_NODE_N938 "/sys/devices/platform/1000b000.pinctrl/mt_gpio" +#else +#define GPIO_NODE_MP "/dev/mtkgpioctrl" +#endif // USING_N938 + class GpioControl {