mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 14:53:32 +08:00
Merge pull request #1650 from liangyongxiang/serial-poll-rx
[device][serial] call rx_indicate function only if the rx_length is n…
This commit is contained in:
commit
f57c46a6b7
@ -1180,8 +1180,11 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event)
|
||||
(serial->config.bufsz - (rx_fifo->get_index - rx_fifo->put_index));
|
||||
rt_hw_interrupt_enable(level);
|
||||
|
||||
if (rx_length)
|
||||
{
|
||||
serial->parent.rx_indicate(&serial->parent, rx_length);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RT_SERIAL_EVENT_TX_DONE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user