1 /* 2 * Copyright (c) 2006-2020, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2020-04-15 hqfang first version 9 */ 10 #ifndef __DRV_UART_H__ 11 #define __DRV_UART_H__ 12 13 #include <rtthread.h> 14 #include <rtdevice.h> 15 #include <drv_config.h> 16 17 /* config class */ 18 struct hbird_uart_config 19 { 20 const char *name; 21 UART_TypeDef *uart; 22 IRQn_Type irqn; 23 }; 24 25 /* hbird uart dirver class */ 26 struct hbird_uart 27 { 28 struct hbird_uart_config *config; 29 struct rt_serial_device serial; 30 }; 31 32 extern int rt_hw_uart_init(void); 33 34 #endif /* __DRV_USART_H__ */ 35 36 /******************* end of file *******************/ 37