From 8e20afae32b9e4115caeea49a470016f71661555 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期四, 09 一月 2025 09:25:33 +0800
Subject: [PATCH] 目前调试完毕  1s上发一次  适配最新板子 看门狗跟静止休眠能同时用,去掉了低功耗超链接模式目前

---
 FML/Internet/Module/AIR780E/AIR780EDriver.c |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/FML/Internet/Module/AIR780E/AIR780EDriver.c b/FML/Internet/Module/AIR780E/AIR780EDriver.c
index 473d9dc..c45593b 100644
--- a/FML/Internet/Module/AIR780E/AIR780EDriver.c
+++ b/FML/Internet/Module/AIR780E/AIR780EDriver.c
@@ -241,11 +241,11 @@
         if (9 == _pstATDevice->m_u32LineLen && memcmp("+RECEIVE,", _pstATDevice->m_pcLineBuf, 9) == 0)
         {
             l_u8Mode = 1;
-            l_u32LastTick = HAL_GetTick();
+            l_u32LastTick = HIDO_TimerGetTick();
         }
 
         /* 超时检查,防止长时间处于IPDATA的状态 */
-        if(((l_u8Mode == 1) || (l_u8Mode == 2) || (l_u8Mode == 3)) && (HAL_GetTick() - l_u32LastTick) > 1500)
+        if(((l_u8Mode == 1) || (l_u8Mode == 2) || (l_u8Mode == 3)) && (HIDO_TimerGetTick() - l_u32LastTick) > 1500)
         {
             break;
         }
@@ -332,11 +332,13 @@
     {
         if((_pstATDevice->m_u32LineLen > 0) && (_pstATDevice->m_pcLineBuf[_pstATDevice->m_u32LineLen - 1] == '\n'))
         {
-            HIDO_DebugEx( "[AT Recv] %s", _pstATDevice->m_pcLineBuf);
+//            LOG_INFO(TRACE_MODULE_APP, "[AT Recv] %s", _pstATDevice->m_pcLineBuf);
+            HIDO_Debug( "[AT Recv] %s", _pstATDevice->m_pcLineBuf);
         }
         else
         {
-            HIDO_DebugEx("[AT Recv] %s\r\n", _pstATDevice->m_pcLineBuf);
+//            LOG_INFO(TRACE_MODULE_APP, "[AT Recv] %s\r\n", _pstATDevice->m_pcLineBuf);
+            HIDO_Debug("[AT Recv] %s\r\n", _pstATDevice->m_pcLineBuf);
         }
     }
 
@@ -582,6 +584,26 @@
  * Author            : 杜键
  * Modified Date:    : 2018年5月22日
  *******************************************************************************/
+void AIR780EUartInit(void)
+{
+
+ ST_UartInit stUartInit;
+
+    /* 串口初始化 */
+    stUartInit.m_eRxMode = UART_RX_MODE_DMA;
+    stUartInit.m_eTxMode = UART_TX_MODE_POLL;
+    stUartInit.m_pu8RxBuf = l_au8AIR780EUartRxBuf;
+    stUartInit.m_u32RxBufSize = AIR780E_UART_RX_BUF_SIZE;
+    stUartInit.m_pu8TxBuf = l_au8AIR780EUartTxBuf;
+    stUartInit.m_u32TxBufSize = AIR780E_UART_TX_BUF_SIZE;
+    stUartInit.m_u32TxQueueMemberCnt = AIR780E_UART_TX_QUEUE_MEMBER_CNT;
+    stUartInit.m_u32BaudRate = 9600;
+    if(Uart_Init(UART_ID_4G, &stUartInit) != HIDO_OK)
+    {
+       
+    }
+}
+extern UART_HandleTypeDef huart5;
 HIDO_INT32 AIR780EDriver_Init(void)
 {
     ST_UartInit stUartInit;
@@ -594,6 +616,7 @@
     stUartInit.m_pu8TxBuf = l_au8AIR780EUartTxBuf;
     stUartInit.m_u32TxBufSize = AIR780E_UART_TX_BUF_SIZE;
     stUartInit.m_u32TxQueueMemberCnt = AIR780E_UART_TX_QUEUE_MEMBER_CNT;
+    stUartInit.m_u32BaudRate = 115200;
     if(Uart_Init(UART_ID_4G, &stUartInit) != HIDO_OK)
     {
         return HIDO_ERR;

--
Gitblit v1.9.3