-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhpl_uart_config.h
78 lines (63 loc) · 1.71 KB
/
hpl_uart_config.h
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
77
78
/* Auto-generated config file hpl_uart_config.h */
#ifndef HPL_UART_CONFIG_H
#define HPL_UART_CONFIG_H
// <<< Use Configuration Wizard in Context Menu >>>
#include <peripheral_clk_config.h>
#ifndef CONF_UART_0_ENABLE
#define CONF_UART_0_ENABLE 1
#endif
// <h> Basic Configuration
// <o> Clock Selection
// <0x0=>Peripheral clock is selected
// <0x1=>PMC programmable clock (PCK4) is selected.
// <i> Clock Selection for UART frame
// <id> uart_usclks
#ifndef CONF_UART_0_USCLKS
#define CONF_UART_0_USCLKS 0x0
#endif
// <o> Frame parity
// <0x0=>Even parity
// <0x1=>Odd parity
// <0x2=>Parity forced to 0
// <0x3=>Parity forced to 1
// <0x4=>No parity
// <i> Parity bit mode for UART frame
// <id> uart_parity
#ifndef CONF_UART_0_PARITY
#define CONF_UART_0_PARITY 0x4
#endif
// <o> Baud rate <1-3000000>
// <i> UART baud rate setting
// <id> uart_baud_rate
#ifndef CONF_UART_0_BAUD
#define CONF_UART_0_BAUD 38400
#endif
// </h>
// <e> Advanced configuration
// <id> uart_advanced
#ifndef CONF_UART_0_ADVANCED_CONFIG
#define CONF_UART_0_ADVANCED_CONFIG 0
#endif
// <o> Channel Mode
// <0=>Normal Mode
// <1=>Automatic Echo
// <2=>Local Loopback
// <3=>Remote Loopback
// <i> Channel mode in UART frame
// <id> uart_channel_mode
#ifndef CONF_UART_0_CHMODE
#define CONF_UART_0_CHMODE 0
#endif
// <q> Receive Line Filter enable
// <i> whether the UART filters the receive line using a three-sample filter
// <id> uart_receive_filter_enable
#ifndef CONF_UART_0_FILTER
#define CONF_UART_0_FILTER 0
#endif
// </e>
// Calculate BAUD register value in UART mode
#ifndef CONF_UART_0_BAUD_CD
#define CONF_UART_0_BAUD_CD ((CONF_UART0_FREQUENCY) / CONF_UART_0_BAUD / 16)
#endif
// <<< end of configuration section >>>
#endif // HPL_UART_CONFIG_H