liyi 1 год назад
Родитель
Сommit
b2ed8a5ca5

+ 11 - 11
truing_control/PDU-Magnetic-Retention-AC/hardware/Key/Key.c

@@ -125,24 +125,24 @@ unsigned char ReadKeyValue(void)
 
 void EXTI0_IRQHandler(void)
 {
-#if SUPPORT_2_DETECTION
-	if(RESET != exti_interrupt_flag_get(DERECTION_IO_2_EXIT))
-	{
-		key_detection_2 = 1;
-		detection_count_2 = 0;
-		exti_interrupt_flag_clear(DERECTION_IO_2_EXIT);
-	}	
-#endif
-}
 
-void EXTI1_IRQHandler(void){
-	
 	if(RESET != exti_interrupt_flag_get(DERECTION_IO_1_EXIT))
 	{
 		key_detection_1 = 1;
 		detection_count_1 = 0;
 		exti_interrupt_flag_clear(DERECTION_IO_1_EXIT);
+	}	
+}
+
+void EXTI1_IRQHandler(void){
+#if SUPPORT_2_DETECTION	
+	if(RESET != exti_interrupt_flag_get(DERECTION_IO_2_EXIT))
+	{
+		key_detection_2 = 1;
+		detection_count_2 = 0;
+		exti_interrupt_flag_clear(DERECTION_IO_2_EXIT);
 	}
+#endif
 	if(RESET != exti_interrupt_flag_get(EXTI_8))
 	{
 		

+ 2 - 2
truing_control/PDU-Magnetic-Retention-AC/usr/board_cfg.h

@@ -3,7 +3,7 @@
 
 
 
-#define  	PRJ_4_BASE                0
+#define  	PRJ_4_BASE                1
 #define 	PRJ_4_ALL_O_ALL_C					0
 #define   PRJ_4_SELF_LOCK_SWITCH    0
 #define 	PRJ_6_BASE								0
@@ -13,7 +13,7 @@
 #define   PRJ_TWIN_FIRE             0
 #define 	PRJ_ITK_8_CHANNEL					0
 #define   PRJ_2_2_BASE              0
-#define   PRJ_8_NEW									1
+#define   PRJ_8_NEW									0
 #define 	PRJ_OLD_4                 0
 #define   PRJ_1_All_OLD             0
 #define   PRJ_7                     0

+ 3 - 3
truing_control/PDU-Magnetic-Retention-AC/usr/main.c

@@ -476,8 +476,8 @@ void switch_recode()
 					{
 						handle_status[i] = EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State;
 						EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State = false;
-						AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+k*2,(uint8_t *)&EE_ACDC_State_ReadReg[k],2);
-						RelayState_ch(k);
+						AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+i*2,(uint8_t *)&EE_ACDC_State_ReadReg[i],2);
+						RelayState_ch(i);
 					}
 			    handle_detection[0] = 0;
 				}
@@ -489,7 +489,7 @@ void switch_recode()
 				EE_ACDC_State_ReadReg[0].ACDC_ALLCha_On_State=true;
 				for(int i = 0;i < RelaySlaveChaNum;i++){
 					EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State=handle_status[i];
-					AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+k*2,(uint8_t *)&EE_ACDC_State_ReadReg[k],2);
+					AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+i*2,(uint8_t *)&EE_ACDC_State_ReadReg[i],2);
 				}
 				
 				All_On_Flag = 1;