chen
2024-12-11 8e0cbe0992619a36bf34a660cfdd75f083f19730
keil/include/drivers/PCA9555.h
@@ -13,8 +13,30 @@
#define  PCA9555_REG_CFG0        0x06                        //  定义方向配置寄存器0地址    
#define  PCA9555_REG_CFG1        0x07                        //  定义方向配置寄存器1地址      
#define  PCA9555_DEVICE_ADDR     0x40                        //  定义PCA9555地址 
#define SDA_0 gpio_pin_clr(SDA_PIN)
#define SCL_0   gpio_pin_clr(SCL_PIN)
#define  PCA_OUTPUT_CONFIG_MASK 0x00
#define  PCA_INPUT_CONFIG_MASK 0xff
#define  SDA_0 gpio_pin_clr(SDA_PIN)
#define  SCL_0 gpio_pin_clr(SCL_PIN)
//0组
#define  MCU_A          0x01
#define  CHG_G          0x02
#define  LORA_IRQ    0x03
#define  LORA_NRST    0x04
#define  ADC_MINIUS 0x05
#define  INPUT_5V    0x06
#define  PWR_ON       0x07
#define  PWR_ENABLE 0x08
//1组
#define GPS_LED     0x09
#define TTS_ENABLE 0x0A
#define WAKE_UP     0x0B
#define AIR780E_ENBALE 0x0C
#define SOS_ENBALE 0x0D
#define GPS_BACKUP 0x0E
#define GPS_POWER  0x0F
#define MAIN_RI    0x10
//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 IIC2_pca_Start(void);
void IIC_pca_Ready(void);