From f1a4fb83203d981d8d2ab7c2184049c90f23d56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E7=BD=97?= Date: Sun, 1 Aug 2021 11:36:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3URC=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E6=89=93=E5=8D=B0=E6=97=A0=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- at.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/at.c b/at.c index 1536333..ca00303 100644 --- a/at.c +++ b/at.c @@ -277,13 +277,14 @@ static void urc_recv_process(at_obj_t *at, const char *buf, unsigned int size) //接收超时处理,默认MAX_URC_RECV_TIMEOUT if (at->urc_cnt > 0 && at_istimeout(at->urc_timer, MAX_URC_RECV_TIMEOUT)) { urc_buf[at->urc_cnt] = '\0'; - at->urc_cnt = 0; - at->urc_item = NULL; if (at->urc_cnt > 2) at->adap.debug("urc recv timeout=>%s\r\n", urc_buf); + at->urc_cnt = 0; + at->urc_item = NULL; } + while (size--) { - at->urc_timer = at_get_ms(); + at->urc_timer = at_get_ms(); ch = *buf++; urc_buf[at->urc_cnt++] = ch;