mirror of
https://gitee.com/moluo-tech/AT-Command
synced 2025-06-17 16:07:52 +00:00
1.按单字符处理接收,避免出现在urc事件中读取数据时,导致后面数据丢失问题.
2.解决多任务发送时,接收完成信号量提前释放的问题。
This commit is contained in:
parent
f1a4fb8320
commit
2c89bb8208
6
at.c
6
at.c
@ -16,6 +16,8 @@
|
|||||||
* 2021-04-08 Morro 解决重复释放信号量导致命令出现等待超时的问题
|
* 2021-04-08 Morro 解决重复释放信号量导致命令出现等待超时的问题
|
||||||
* 2021-05-15 Morro 优化URC匹配程序
|
* 2021-05-15 Morro 优化URC匹配程序
|
||||||
* 2021-07-20 Morro 增加锁,解决执行at_do_work时urc部分数据丢失问题
|
* 2021-07-20 Morro 增加锁,解决执行at_do_work时urc部分数据丢失问题
|
||||||
|
* 2021-11-20 Morro 按单字符处理接收,避免出现在urc事件中读取数据时
|
||||||
|
* 导致后面数据丢失问题
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
#include "at.h"
|
#include "at.h"
|
||||||
@ -318,6 +320,8 @@ static void urc_recv_process(at_obj_t *at, const char *buf, unsigned int size)
|
|||||||
static void resp_notification(at_obj_t *at, at_return ret)
|
static void resp_notification(at_obj_t *at, at_return ret)
|
||||||
{
|
{
|
||||||
at->ret = ret;
|
at->ret = ret;
|
||||||
|
at->resp = NULL;
|
||||||
|
|
||||||
at_sem_post(at->completed);
|
at_sem_post(at->completed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,7 +402,7 @@ void at_resume(at_obj_t *at)
|
|||||||
*/
|
*/
|
||||||
void at_process(at_obj_t *at)
|
void at_process(at_obj_t *at)
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[1];
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
if (!at_sem_wait(at->recv_lock, MAX_AT_LOCK_TIME))
|
if (!at_sem_wait(at->recv_lock, MAX_AT_LOCK_TIME))
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user