| | |
| | | #define PCA_INPUT_CONFIG_MASK 0xff |
| | | #define SDA_0 gpio_pin_clr(SDA_PIN) |
| | | #define SCL_0 gpio_pin_clr(SCL_PIN) |
| | | |
| | | #define MAX_GPIO_NUM 16 |
| | | //0组 |
| | | #define MCU_A 0x01 |
| | | #define CHG_G 0x02 |
| | |
| | | #define GPS_BACKUP 0x0E |
| | | #define GPS_POWER 0x0F |
| | | #define MAIN_RI 0x10 |
| | | |
| | | //输入寄存器INT判断数组对应位置 |
| | | //input 0组 |
| | | #define MCU_A_POSITION (1<<(MAX_GPIO_NUM-MCU_A)) |
| | | #define CHG_G_POSITION (1<<(MAX_GPIO_NUM-CHG_G)) |
| | | #define LORA_IRQ_POSITION (1<<(MAX_GPIO_NUM-LORA_IRQ)) |
| | | #define LORA_NRST_POSITION (1<<(MAX_GPIO_NUM-LORA_NRST)) |
| | | #define ADC_MINIUS_POSITION (1<<(MAX_GPIO_NUM-ADC_MINIUS)) |
| | | #define INPUT_5V_POSITION (1<<(MAX_GPIO_NUM-INPUT_5V)) |
| | | #define PWR_ON_POSITION (1<<(MAX_GPIO_NUM-PWR_ON)) |
| | | #define PWR_ENABLE_POSITION (1<<(MAX_GPIO_NUM-PWR_ENABLE)) |
| | | //input 1组 |
| | | #define GPS_LED_POSITION (1<<(MAX_GPIO_NUM-GPS_LED)) |
| | | #define TTS_ENABLE_POSITION (1<<(MAX_GPIO_NUM-TTS_ENABLE)) |
| | | #define WAKE_UP_POSITION (1<<(MAX_GPIO_NUM-WAKE_UP)) |
| | | #define AIR780E_ENBALE_POSITION (1<<(MAX_GPIO_NUM-AIR780E_ENBALE)) |
| | | #define SOS_ENBALE_POSITION (1<<(MAX_GPIO_NUM-SOS_ENBALE)) |
| | | #define GPS_BACKUP_POSITION (1<<(MAX_GPIO_NUM-GPS_BACKUP)) |
| | | #define GPS_POWER_POSITION (1<<(MAX_GPIO_NUM-GPS_POWER)) |
| | | #define MAIN_RI_POSITION (1<<(MAX_GPIO_NUM-MAIN_RI)) |
| | | //uint8_t gps_led_output_state,tts_enbale_output_state,wake_up_output_state,air780e_enable_output_state,sos_enable_output_state,gps_backup_output_state,gps_power_output_state,main_ri_output_state;//1组output IO口从左到右1.0~1.7 |
| | | //uint8_t mcu_a_output_state,chg_g_output_state,lora_irq_output_state,lora_nrst_output_state,adc_minius_output_state,input_5v_output_state,pwr_on_output_state,pwr_enable_output_state;//2组output IO口从左到右0.0~0.7 |
| | | void IIC_gpio_pca_init(void); |
| | |
| | | void PCA9555_Set_All_Output(unsigned char value); |
| | | void PCA9555_Set_One_Value_Output(unsigned char num,unsigned char value); |
| | | void PCA9555_Set_One_Value_Config(unsigned char num,unsigned char value) ; |
| | | void PCA9555_init(); |
| | | void PCA9555_init(); |