Huyi 1 year ago
parent
commit
ac0ff8d0fc
1 changed files with 16 additions and 15 deletions
  1. 16 15
      Hardware/GPIOA.c

+ 16 - 15
Hardware/GPIOA.c

@@ -4,34 +4,35 @@ void GPIOA_Init(void)
 {
 	#if  EC800M
 	RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE);
-	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
 	GPIO_InitTypeDef GPIO_InitStructure;
 	
-	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
-	GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
-	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_InitStructure.GPIO_Mode	= GPIO_Mode_Out_PP;
+	GPIO_InitStructure.GPIO_Pin 	= WAKE_GPIO_Pin;
+	GPIO_InitStructure.GPIO_Speed	= GPIO_Speed_50MHz;
 	GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
-	GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 4G拉高
-	 #endif
+	GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); 	// 4G拉高
+	 #endif	
 
 	#if  BC260Y
-	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
+	RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE);
 	GPIO_InitTypeDef GPIO_InitStructure;
-	GPIO_InitStructure.GPIO_Pin 	= GPIO_Pin_7;
+
 	GPIO_InitStructure.GPIO_Mode	= GPIO_Mode_Out_PP;
-	GPIO_InitStructure.GPIO_Speed 	= GPIO_Speed_50MHz;	
+	GPIO_InitStructure.GPIO_Pin 	= WAKE_GPIO_Pin;
+	GPIO_InitStructure.GPIO_Speed	= GPIO_Speed_50MHz;
 	GPIO_Init(GPIOA, &GPIO_InitStructure);
-	GPIO_ResetBits(GPIOA, GPIO_Pin_7); // nb拉低
+	GPIO_ResetBits(GPIOA, GPIO_Pin_7); 			// nb拉低
 	#endif
 	
 	#if  ESP32
 	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
 	GPIO_InitTypeDef GPIO_InitStructure;
-	GPIO_InitStructure.GPIO_Mode = 	GPIO_Mode_Out_PP;
-	GPIO_InitStructure.GPIO_Pin = 	WAKE_GPIO_Pin;
-	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+
+	GPIO_InitStructure.GPIO_Mode	= GPIO_Mode_Out_PP;
+	GPIO_InitStructure.GPIO_Pin 	= WAKE_GPIO_Pin;
+	GPIO_InitStructure.GPIO_Speed	= GPIO_Speed_50MHz;
 	GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
-	GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // WiFi深休眠引脚拉低
+	GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); 	// WiFi深休眠引脚拉低
 	#endif
 	
 	#if  AIWB2
@@ -42,7 +43,7 @@ void GPIOA_Init(void)
 	GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
 	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
 	GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
-	GPIO_ResetBits(GPIOA, GPIO_Pin_6); //WIFI_AIWB2-32S拉低	
+	GPIO_ResetBits(GPIOA, GPIO_Pin_6); 			//WIFI_AIWB2-32S拉低	
 	#endif
 }