mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 09:07:05 +08:00
Update drv_usart.c
This commit is contained in:
parent
030b365333
commit
893bb72907
@ -634,11 +634,13 @@ void LPUART1_DMA_RX_IRQHandler(void)
|
|||||||
#ifdef RT_SERIAL_USING_DMA
|
#ifdef RT_SERIAL_USING_DMA
|
||||||
static void stm32_dma_config(struct rt_serial_device *serial, rt_ubase_t flag)
|
static void stm32_dma_config(struct rt_serial_device *serial, rt_ubase_t flag)
|
||||||
{
|
{
|
||||||
RT_ASSERT(serial != RT_NULL);
|
|
||||||
struct rt_serial_rx_fifo *rx_fifo
|
struct rt_serial_rx_fifo *rx_fifo
|
||||||
DMA_HandleTypeDef *DMA_Handle;
|
DMA_HandleTypeDef *DMA_Handle;
|
||||||
struct dma_config *dma_config;
|
struct dma_config *dma_config;
|
||||||
struct stm32_uart *uart = (struct stm32_uart *)serial->parent.user_data;
|
struct stm32_uart *uart;
|
||||||
|
|
||||||
|
RT_ASSERT(serial != RT_NULL);
|
||||||
|
uart = (struct stm32_uart *)serial->parent.user_data;
|
||||||
RT_ASSERT(uart != RT_NULL);
|
RT_ASSERT(uart != RT_NULL);
|
||||||
|
|
||||||
if (RT_DEVICE_FLAG_DMA_RX == flag)
|
if (RT_DEVICE_FLAG_DMA_RX == flag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user