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-06-27 AHTYDHD the first version 9 */ 10 11 #ifndef __UART_CONFIG_H__ 12 #define __UART_CONFIG_H__ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #if defined(BSP_USING_UART0) 19 #ifndef UART0_CONFIG 20 #define UART0_CONFIG \ 21 { \ 22 .name = "uart0", \ 23 .uartbase = UART0_BASE, \ 24 .baudrate = 115200, \ 25 .mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \ 26 UART_CONFIG_PAR_NONE \ 27 } 28 #endif /* UART1_CONFIG */ 29 #endif /* BSP_USING_UART1*/ 30 31 #if defined(BSP_USING_UART1) 32 #ifndef UART1_CONFIG 33 #define UART1_CONFIG \ 34 { \ 35 .name = "uart1", \ 36 .uartbase = UART1_BASE, \ 37 .baudrate = 115200, \ 38 .mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \ 39 UART_CONFIG_PAR_NONE \ 40 } 41 #endif /* UART1_CONFIG */ 42 #endif /* BSP_USING_UART1*/ 43 44 #if defined(BSP_USING_UART2) 45 #ifndef UART2_CONFIG 46 #define UART2_CONFIG \ 47 { \ 48 .name = "uart2", \ 49 .uartbase = UART2_BASE, \ 50 .baudrate = 115200, \ 51 .mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \ 52 UART_CONFIG_PAR_NONE \ 53 } 54 #endif /* UART2_CONFIG */ 55 #endif /* BSP_USING_UART2*/ 56 57 #if defined(BSP_USING_UART3) 58 #ifndef UART3_CONFIG 59 #define UART3_CONFIG \ 60 { \ 61 .name = "uart3", \ 62 .uartbase = UART3_BASE, \ 63 .baudrate = 115200, \ 64 .mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \ 65 UART_CONFIG_PAR_NONE \ 66 } 67 #endif /* UART3_CONFIG */ 68 #endif /* BSP_USING_UART3*/ 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* __UART_CONFIG_H__ */ 75 76 /************************** end of file ******************/ 77