Merge pull request #335 from heyuanjie87/ForPullRequest
[Serial] BUG Fix: data be send twice in mode that other than polling
This commit is contained in:
commit
be9aa36abf
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue