1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2020-03-04     shelton      first version
9  */
10 
11 #ifndef __DRV_UART_H__
12 #define __DRV_UART_H__
13 
14 #include <rtthread.h>
15 #include <rtdevice.h>
16 #include "drv_dma.h"
17 
18 struct at32_uart {
19     char *name;
20     usart_type *uart_x;
21     IRQn_Type irqn;
22     struct dma_config *dma_rx;
23     rt_size_t last_index;
24     struct dma_config *dma_tx;
25     rt_uint16_t uart_dma_flag;
26     struct rt_serial_device serial;
27 };
28 
29 int rt_hw_usart_init(void);
30 
31 #endif /* __DRV_USART_H__ */
32 
33 /******************* end of file *******************/
34