提交 8a44c7db 编写于 作者: H heyuanjie87

[Serial] BUG Fix: data be send twice in mode that other than polling

上级 7bd85ac5
......@@ -431,14 +431,16 @@ static rt_size_t rt_serial_write(struct rt_device *dev,
if (dev->open_flag & RT_DEVICE_FLAG_INT_TX)
{
_serial_int_tx(serial, buffer, size);
return _serial_int_tx(serial, buffer, size);
}
else if (dev->open_flag & RT_DEVICE_FLAG_DMA_TX)
{
_serial_dma_tx(serial, buffer, size);
return _serial_dma_tx(serial, buffer, size);
}
else
{
return _serial_poll_tx(serial, buffer, size);
}
}
static rt_err_t rt_serial_control(struct rt_device *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册