mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 18:03:31 +08:00
[net][at] Add AT serial device receive data length judgment.
This commit is contained in:
parent
c2add5cb4e
commit
f5d9276434
@ -577,7 +577,11 @@ static void client_parser(at_client_t client)
|
||||
|
||||
static rt_err_t at_client_rx_ind(rt_device_t dev, rt_size_t size)
|
||||
{
|
||||
rt_sem_release(at_client_local->rx_notice);
|
||||
if (size > 0)
|
||||
{
|
||||
rt_sem_release(at_client_local->rx_notice);
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,10 @@ __retry:
|
||||
|
||||
static rt_err_t at_rx_ind(rt_device_t dev, rt_size_t size)
|
||||
{
|
||||
rt_sem_release(at_server_local->rx_notice);
|
||||
if (size > 0)
|
||||
{
|
||||
rt_sem_release(at_server_local->rx_notice);
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user