WXK
2025-03-14 5631f61d1e227cf40802bcef95b1bf9c053cb04a
keil/include/drivers/serial_at_cmd_app.c
@@ -140,6 +140,7 @@
    }
}
extern uint8_t enable_sleep_count,sleep_flag;
void UsartParseDataHandler(uint8_t data)
{
   static UsartRecvPackState usart_receive_state = UsartReceiveWaitHead0;
@@ -166,7 +167,7 @@
         {
            case CMD_WRITE:
               //从mUsartReceivePack中读取pack_length长度的字节,放到全局变量中,赋值保存的参数并且存入flash
            enable_sleep_count=0;
               memcpy((uint8_t*)&g_com_map + pack_index, mUsartReceivePack, pack_datalen);
            
               if(mUsartReceivePack[0]==1)
@@ -178,6 +179,7 @@
               NVIC_SystemReset();
               break;
            case CMD_READ:
                    enable_sleep_count=0;
               //read包中data字节,即mUsartReceivePack[0]表示数据长度;
            //从g_com_data结构体中的第index位置读取长度为mUsartReceivePack[0]的字节,发送出来
               SendComMap0(pack_datalen,pack_index>>1);