未验证 提交 f57c46a6 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1650 from liangyongxiang/serial-poll-rx

[device][serial] call rx_indicate function only if the rx_length is n…
...@@ -1180,7 +1180,10 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event) ...@@ -1180,7 +1180,10 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event)
(serial->config.bufsz - (rx_fifo->get_index - rx_fifo->put_index)); (serial->config.bufsz - (rx_fifo->get_index - rx_fifo->put_index));
rt_hw_interrupt_enable(level); rt_hw_interrupt_enable(level);
serial->parent.rx_indicate(&serial->parent, rx_length); if (rx_length)
{
serial->parent.rx_indicate(&serial->parent, rx_length);
}
} }
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册