2020-07-01 23:44:57 +08:00
|
|
|
/*
|
2021-03-21 22:23:24 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2020-07-01 23:44:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
#ifndef __UART_CONFIG_H__
|
|
|
|
#define __UART_CONFIG_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART0)
|
|
|
|
#ifndef UART0_CONFIG
|
|
|
|
#define UART0_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart0", \
|
2020-07-02 14:43:10 +08:00
|
|
|
.uartbase = UART0_BASE, \
|
|
|
|
.baudrate = 115200, \
|
|
|
|
.mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \
|
2020-06-24 19:54:42 +08:00
|
|
|
UART_CONFIG_PAR_NONE \
|
|
|
|
}
|
|
|
|
#endif /* UART1_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_UART1*/
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#if defined(BSP_USING_UART1)
|
|
|
|
#ifndef UART1_CONFIG
|
|
|
|
#define UART1_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart1", \
|
2020-07-02 14:43:10 +08:00
|
|
|
.uartbase = UART1_BASE, \
|
|
|
|
.baudrate = 115200, \
|
|
|
|
.mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \
|
2020-06-24 19:54:42 +08:00
|
|
|
UART_CONFIG_PAR_NONE \
|
|
|
|
}
|
|
|
|
#endif /* UART1_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART1*/
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART2)
|
|
|
|
#ifndef UART2_CONFIG
|
|
|
|
#define UART2_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart2", \
|
2020-07-02 14:43:10 +08:00
|
|
|
.uartbase = UART2_BASE, \
|
|
|
|
.baudrate = 115200, \
|
|
|
|
.mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \
|
2020-06-24 19:54:42 +08:00
|
|
|
UART_CONFIG_PAR_NONE \
|
|
|
|
}
|
|
|
|
#endif /* UART2_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART2*/
|
2020-07-02 14:43:10 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#if defined(BSP_USING_UART3)
|
|
|
|
#ifndef UART3_CONFIG
|
|
|
|
#define UART3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart3", \
|
2020-07-02 14:43:10 +08:00
|
|
|
.uartbase = UART3_BASE, \
|
|
|
|
.baudrate = 115200, \
|
|
|
|
.mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \
|
2020-06-24 19:54:42 +08:00
|
|
|
UART_CONFIG_PAR_NONE \
|
|
|
|
}
|
|
|
|
#endif /* UART3_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_UART3*/
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#endif /* __UART_CONFIG_H__ */
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2021-03-21 22:23:24 +08:00
|
|
|
/************************** end of file ******************/
|