rt-thread-official/bsp/tm4c123bsp/libraries/Drivers/config/uart_config.h

77 lines
2.8 KiB
C
Raw Normal View History

/*
2021-03-21 22:23:24 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-06-27 AHTYDHD the first version
*/
#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 | \
UART_CONFIG_PAR_NONE \
}
#endif /* UART1_CONFIG */
2020-07-02 14:43:10 +08:00
#endif /* BSP_USING_UART1*/
#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 | \
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 | \
UART_CONFIG_PAR_NONE \
}
#endif /* UART2_CONFIG */
#endif /* BSP_USING_UART2*/
2020-07-02 14:43:10 +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 | \
UART_CONFIG_PAR_NONE \
}
#endif /* UART3_CONFIG */
2020-07-02 14:43:10 +08:00
#endif /* BSP_USING_UART3*/
#ifdef __cplusplus
}
#endif
#endif /* __UART_CONFIG_H__ */
2021-03-21 22:23:24 +08:00
/************************** end of file ******************/