blob: 01faa59e2c86de58748cd2bcd5fe8d3d281d9410 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
/*
* Copyright 2018-2020 NXP
* All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _RTE_DEVICE_H
#define _RTE_DEVICE_H
#include "pin_mux.h"
/* Driver name mapping. */
/* User needs to provide the implementation of LPUARTX_GetFreq/LPUARTX_InitPins/LPUARTX_DeinitPins for the enabled
* LPUART instance. */
#define RTE_USART1 1
#define RTE_USART1_DMA_EN 0
#define RTE_USART2 0
#define RTE_USART2_DMA_EN 0
#define RTE_USART3 0
#define RTE_USART3_DMA_EN 0
#define RTE_USART4 0
#define RTE_USART4_DMA_EN 0
#define RTE_USART5 0
#define RTE_USART5_DMA_EN 0
#define RTE_USART6 0
#define RTE_USART6_DMA_EN 0
#define RTE_USART7 0
#define RTE_USART7_DMA_EN 0
#define RTE_USART8 1
#define RTE_USART8_DMA_EN 0
/* UART configuration. */
#define RTE_USART1_PIN_INIT LPUART1_InitPins
#define RTE_USART1_PIN_DEINIT LPUART1_DeinitPins
#define RTE_USART1_DMA_TX_CH 0
#define RTE_USART1_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART1Tx
#if __CORTEX_M == 7
#define RTE_USART1_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART1_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART1_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART1_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART1_DMA_RX_CH 1
#define RTE_USART1_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART1Rx
#if __CORTEX_M == 7
#define RTE_USART1_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART1_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART1_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART1_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART2_PIN_INIT LPUART2_InitPins
#define RTE_USART2_PIN_DEINIT LPUART2_DeinitPins
#define RTE_USART2_DMA_TX_CH 0
#define RTE_USART2_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART2Tx
#if __CORTEX_M == 7
#define RTE_USART2_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART2_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART2_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART2_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART2_DMA_RX_CH 1
#define RTE_USART2_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART2Rx
#if __CORTEX_M == 7
#define RTE_USART2_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART2_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART2_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART2_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART3_PIN_INIT LPUART3_InitPins
#define RTE_USART3_PIN_DEINIT LPUART3_DeinitPins
#define RTE_USART3_DMA_TX_CH 0
#define RTE_USART3_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART3Tx
#if __CORTEX_M == 7
#define RTE_USART3_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART3_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART3_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART3_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART3_DMA_RX_CH 1
#define RTE_USART3_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART3Rx
#if __CORTEX_M == 7
#define RTE_USART3_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART3_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART3_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART3_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART4_PIN_INIT LPUART4_InitPins
#define RTE_USART4_PIN_DEINIT LPUART4_DeinitPins
#define RTE_USART4_DMA_TX_CH 0
#define RTE_USART4_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART4Tx
#if __CORTEX_M == 7
#define RTE_USART4_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART4_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART4_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART4_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART4_DMA_RX_CH 1
#define RTE_USART4_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART4Rx
#if __CORTEX_M == 7
#define RTE_USART4_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART4_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART4_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART4_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART5_PIN_INIT LPUART5_InitPins
#define RTE_USART5_PIN_DEINIT LPUART5_DeinitPins
#define RTE_USART5_DMA_TX_CH 0
#define RTE_USART5_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART5Tx
#if __CORTEX_M == 7
#define RTE_USART5_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART5_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART5_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART5_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART5_DMA_RX_CH 1
#define RTE_USART5_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART5Rx
#if __CORTEX_M == 7
#define RTE_USART5_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART5_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART5_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART5_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART6_PIN_INIT LPUART6_InitPins
#define RTE_USART6_PIN_DEINIT LPUART6_DeinitPins
#define RTE_USART6_DMA_TX_CH 0
#define RTE_USART6_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART6Tx
#if __CORTEX_M == 7
#define RTE_USART6_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART6_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART6_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART6_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART6_DMA_RX_CH 1
#define RTE_USART6_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART6Rx
#if __CORTEX_M == 7
#define RTE_USART6_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART6_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART6_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART6_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART7_PIN_INIT LPUART7_InitPins
#define RTE_USART7_PIN_DEINIT LPUART7_DeinitPins
#define RTE_USART7_DMA_TX_CH 0
#define RTE_USART7_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART7Tx
#if __CORTEX_M == 7
#define RTE_USART7_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART7_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART7_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART7_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART7_DMA_RX_CH 1
#define RTE_USART7_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART7Rx
#if __CORTEX_M == 7
#define RTE_USART7_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART7_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART7_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART7_DMA_RX_DMA_BASE DMA1
#endif
#define RTE_USART8_PIN_INIT LPUART8_InitPins
#define RTE_USART8_PIN_DEINIT LPUART8_DeinitPins
#define RTE_USART8_DMA_TX_CH 0
#define RTE_USART8_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART8Tx
#if __CORTEX_M == 7
#define RTE_USART8_DMA_TX_DMAMUX_BASE DMAMUX0
#define RTE_USART8_DMA_TX_DMA_BASE DMA0
#else
#define RTE_USART8_DMA_TX_DMAMUX_BASE DMAMUX1
#define RTE_USART8_DMA_TX_DMA_BASE DMA1
#endif
#define RTE_USART8_DMA_RX_CH 1
#define RTE_USART8_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART8Rx
#if __CORTEX_M == 7
#define RTE_USART8_DMA_RX_DMAMUX_BASE DMAMUX0
#define RTE_USART8_DMA_RX_DMA_BASE DMA0
#else
#define RTE_USART8_DMA_RX_DMAMUX_BASE DMAMUX1
#define RTE_USART8_DMA_RX_DMA_BASE DMA1
#endif
/* ENET configuration. */
#define RTE_ENET 1
#define RTE_ENET_PHY_ADDRESS 1
#define RTE_ENET_MII 0
#define RTE_ENET_RMII 1
#define RTE_ENET_RGMII 1
#endif /* _RTE_DEVICE_H */
|