From 8e0cbe0992619a36bf34a660cfdd75f083f19730 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期三, 11 十二月 2024 10:43:28 +0800
Subject: [PATCH] PCA驱动完成,读写功能正常,PCA的INT中断未配置

---
 keil/include/drivers/PCA9555.h |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/keil/include/drivers/PCA9555.h b/keil/include/drivers/PCA9555.h
index 2205304..440ff18 100644
--- a/keil/include/drivers/PCA9555.h
+++ b/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);

--
Gitblit v1.9.3