Update drv_usart.c

修复RX DMA 第一包收不到的bug
This commit is contained in:
ItsGettingWorse
2022-10-22 15:11:46 -04:00
committed by Man, Jianting (Meco)
parent 11f52eebcf
commit 9c6d8d96ce
+1 -1
View File
@@ -170,7 +170,7 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c
#ifdef RT_SERIAL_USING_DMA
if (!(serial->parent.open_flag & RT_DEVICE_OFLAG_OPEN)) {
uart->dma_rx.remaining_cnt = 0;
uart->dma_rx.remaining_cnt = cfg->bufsz;
}
#endif