1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2018.10.30     SummerGift   first version
9  * 2019.03.05     whj4674672   add stm32h7
10  * 2020-10-14     Dozingfiretruck   Porting for stm32wbxx
11  */
12 
13 #ifndef __DRV_USART_H__
14 #define __DRV_USART_H__
15 
16 #include <rtthread.h>
17 #include "rtdevice.h"
18 #include <rthw.h>
19 #include <drv_common.h>
20 #include "board.h"
21 
22 int rt_hw_usart_init(void);
23 
24 
25 /* stm32 config class */
26 struct _uart_config
27 {
28     const char *name;
29     void *InitTypeDef;
30     IRQn_Type irq_type;
31     uint32_t clockSrc;
32 };
33 
34 /* stm32 uart dirver class */
35 struct _uart
36 {
37     FL_UART_InitTypeDef  handle;
38     struct _uart_config *config;
39     rt_uint16_t uart_dma_flag;
40     struct rt_serial_device serial;
41 };
42 
43 #endif  /* __DRV_USART_H__ */
44