[components/drivers/serial]add low level DMA TX config support.

This commit is contained in:
misonyo 2019-05-13 15:52:20 +08:00
parent 9f7cc78b06
commit f58e947da6
1 changed files with 2 additions and 0 deletions

View File

@ -675,6 +675,8 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
serial->serial_tx = tx_dma; serial->serial_tx = tx_dma;
dev->open_flag |= RT_DEVICE_FLAG_DMA_TX; dev->open_flag |= RT_DEVICE_FLAG_DMA_TX;
/* configure low level device */
serial->ops->control(serial, RT_DEVICE_CTRL_CONFIG, (void *)RT_DEVICE_FLAG_DMA_TX);
} }
#endif /* RT_SERIAL_USING_DMA */ #endif /* RT_SERIAL_USING_DMA */
else else