1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-07-15 yby 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", \
.uartbase = UART0_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_UART1)
#ifndef UART1_CONFIG
#define UART1_CONFIG \
{ \
.name = "uart1", \
.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", \
.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*/
#if defined(BSP_USING_UART3)
#ifndef UART3_CONFIG
#define UART3_CONFIG \
{ \
.name = "uart3", \
.uartbase = UART3_BASE, \
.baudrate = 115200, \
.mode = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | \
UART_CONFIG_PAR_NONE \
}
#endif /* UART3_CONFIG */
#endif /* BSP_USING_UART3*/
#ifdef __cplusplus
}
#endif
#endif /* __UART_CONFIG_H__ */
/************************** end of file ******************/
|