Forráskód Böngészése

减短开机速度

huang_chao 1 éve
szülő
commit
3fc9331d0c
2 módosított fájl, 15 hozzáadás és 12 törlés
  1. 4 4
      .settings/language.settings.xml
  2. 11 8
      src/AppTaskUart1.c

+ 4 - 4
.settings/language.settings.xml

@@ -5,7 +5,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1378168708941678206" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1281025181662638893" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
@@ -16,7 +16,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1378168708941678206" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1281025181662638893" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
@@ -27,7 +27,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1378168708941678206" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1281025181662638893" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
@@ -38,7 +38,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1378168708941678206" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1281025181662638893" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>

+ 11 - 8
src/AppTaskUart1.c

@@ -110,7 +110,7 @@ void wifi_task(void *pvParameters)
 	uint8 UartDataBuffer[512] = {0};
 	//TimerHandle_t softTimer1 = xTimerCreate("softTimer1", 10, pdTRUE, (void *)0, vTimerCallback);
     Dio_WriteChannel(DioConf_DioChannel_PTD16_GPIO_OUT_MCU_WIFI_POW_EN, STD_ON);//wifi开机
-	vTaskDelay(pdMS_TO_TICKS(5000));//开机后等一段时间模块可能会返回开机后的指令 不做处理
+	vTaskDelay(pdMS_TO_TICKS(3000));//开机后等一段时间模块可能会返回开机后的指令 不做处理
 	wifi_init(0);
 	#if WIFI_MASTER
 	tcp_server_process_status = TCP_IDLE;
@@ -224,8 +224,11 @@ void wifi_task(void *pvParameters)
 					}
 				}
 				/* 解码部分 */
-				wifiDataDecode(UartDataBuffer, ReadLen);
-
+				if(ReadLen > 0)
+				{
+					wifiDataDecode(UartDataBuffer, ReadLen);
+					vTaskDelay(pdMS_TO_TICKS(10));
+				}
 				/* 心跳报文发送 */
 				static uint64 tickcount = 0;
 				if(xTaskGetTickCount() - tickcount > pdMS_TO_TICKS(2000))
@@ -358,7 +361,7 @@ static void wifiDataDecode(uint8 *dataIn,uint16 dataLen)
 {
 	uint8 cmd = 0;
 	cmd = dataIn[5];
-	uint8 sendBuffer[128];
+	uint8 sendBuffer[256];
 	uint16 dataOutLen = 0;
 	switch(cmd)
 	{
@@ -465,15 +468,15 @@ static void wifi_init(uint8 Step)
 			}
 			case 4:
 			{
-				//const char* wifi_init = "\"Hoisting\",\"jx999999\"\r\n";
-				const char* wifi_init = "\"123456\",\"12345678\"\r\n";
+				const char* wifi_init = "\"Hoisting\",\"jx999999\"\r\n";
+				//const char* wifi_init = "\"123456\",\"12345678\"\r\n";
 				WIFI_CMD_INIT(AT_CWJAP,(uint8*)wifi_init,strlen(wifi_init),InitStep,ATRet);
 				break;
 			}
 			case 5:
 			{
-				//const char* wifi_ip_info_init = "\"TCP\",\"192.168.3.177\",5588\r\n";
-				const char* wifi_ip_info_init = "\"TCP\",\"192.168.0.13\",5588\r\n";
+				const char* wifi_ip_info_init = "\"TCP\",\"192.168.3.177\",5588\r\n";
+				//const char* wifi_ip_info_init = "\"TCP\",\"192.168.0.13\",5588\r\n";
 				WIFI_CMD_INIT(AT_CIPSTART,wifi_ip_info_init,strlen(wifi_ip_info_init),InitStep,ATRet);
 				break;
 			}