Переглянути джерело

Merge branch 'master' of http://192.168.100.32:3000/longsanlang/Network-Modules

# Conflicts:
#	Drivers/CONFIG.h
龙三郎 1 рік тому
батько
коміт
10ee7c3e9d
3 змінених файлів з 7 додано та 24 видалено
  1. 0 16
      Drivers/CONFIG.h
  2. 4 4
      Drivers/Modules/esp32/esp32.c
  3. 3 4
      Hardware/GPIOA.c

+ 0 - 16
Drivers/CONFIG.h

@@ -17,20 +17,6 @@
 #define ESP32 1		//WiFi
 
 
-#if ESP32			
-// 胡一的配置
-
-//睡眠相关IO配置 
-#define WAKE_GPIO_RCC RCC_APB2Periph_GPIOA
-#define WAKE_GPIO GPIOA
-#define DEEP_SLEEP_GPIO_Pin  GPIO_Pin_6 	// 深睡眠的引脚
-#define LIGHT_SLEEP_GPIO_Pin GPIO_Pin_7 	// 浅睡眠的引脚
-//flash相关配置
-#define FLASH_SIZE 	64
-#define FLASH_SAVE_ADDR 0X0800F800
-
-#endif
-
 
 
 // 何龙祥的配置
@@ -44,8 +30,6 @@
 
 
 
-
-
 // 刘艳斌的配置
 //睡眠相关IO配置
 //#define WAKE_GPIO_RCC RCC_APB2Periph_GPIOE

+ 4 - 4
Drivers/Modules/esp32/esp32.c

@@ -184,25 +184,25 @@ void esp32_reset(void)
 //2.退出深休眠
 void esp32_exit_deepsleep(void)
 {
-	GPIO_SetBits(WAKE_GPIO, DEEP_SLEEP_GPIO_Pin); 	// 拉高IO口,使能ESP32_C3模组
+	GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); 	// 拉高IO口,使能ESP32_C3模组
 }		
 
 //3.进入深休眠
 void esp32_enter_deepsleep(void)
 {
-	GPIO_ResetBits(WAKE_GPIO, DEEP_SLEEP_GPIO_Pin); // 拉低IO口,使ESP32_C3模组失能
+	GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 拉低IO口,使ESP32_C3模组失能
 }	
 
 //4.退出浅休眠	(使用此功能需先配置浅休眠模式)
 void esp32_exit_lightsleep(void)
 {
-	GPIO_SetBits(WAKE_GPIO, LIGHT_SLEEP_GPIO_Pin); 	// 拉高IO口,使ESP32_C3模组退出浅休眠
+//	GPIO_SetBits(WAKE_GPIO, LIGHT_SLEEP_GPIO_Pin); 	// 拉高IO口,使ESP32_C3模组退出浅休眠
 }
 
 //5.进入浅休眠	(使用此功能需先配置浅休眠模式)
 void esp32_enter_lightsleep(void)
 {
-	GPIO_ResetBits(WAKE_GPIO, LIGHT_SLEEP_GPIO_Pin);// 拉低IO口,使ESP32_C3模组进入浅休眠
+//	GPIO_ResetBits(WAKE_GPIO, LIGHT_SLEEP_GPIO_Pin);// 拉低IO口,使ESP32_C3模组进入浅休眠
 }
 
 

+ 3 - 4
Hardware/GPIOA.c

@@ -28,12 +28,11 @@ void GPIOA_Init(void)
 	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
 	GPIO_InitTypeDef GPIO_InitStructure;
 	GPIO_InitStructure.GPIO_Mode = 	GPIO_Mode_Out_PP;
-	GPIO_InitStructure.GPIO_Pin = 	DEEP_SLEEP_GPIO_Pin|LIGHT_SLEEP_GPIO_Pin;
+	GPIO_InitStructure.GPIO_Pin = 	WAKE_GPIO_Pin;
 	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
 	GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
-	
-	GPIO_ResetBits(WAKE_GPIO, DEEP_SLEEP_GPIO_Pin); // WiFi�金추多신윗됴
-	GPIO_SetBits(WAKE_GPIO, LIGHT_SLEEP_GPIO_Pin);	// WiFi풍金추多신윗멕
+	GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // WiFi�金추多신윗됴
+
 	#endif
 }