[net][at] Add AT serial device receive data length judgment.

This commit is contained in:
chenyong 2018-08-03 16:11:31 +08:00
parent c2add5cb4e
commit f5d9276434
2 changed files with 9 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}