]> begriffs open source - cmsis-driver-validation/blob - Boards/ST/STM32F746G-Discovery/CMSIS_DV_API/RTE/Device/STM32F746NGHx/RTE_Device.h
add all files from internal repository
[cmsis-driver-validation] / Boards / ST / STM32F746G-Discovery / CMSIS_DV_API / RTE / Device / STM32F746NGHx / RTE_Device.h
1 /* -----------------------------------------------------------------------------
2  * Copyright (c) 2013-2017 ARM Ltd.
3  *
4  * This software is provided 'as-is', without any express or implied warranty.
5  * In no event will the authors be held liable for any damages arising from
6  * the use of this software. Permission is granted to anyone to use this
7  * software for any purpose, including commercial applications, and to alter
8  * it and redistribute it freely, subject to the following restrictions:
9  *
10  * 1. The origin of this software must not be misrepresented; you must not
11  *    claim that you wrote the original software. If you use this software in
12  *    a product, an acknowledgment in the product documentation would be
13  *    appreciated but is not required.
14  *
15  * 2. Altered source versions must be plainly marked as such, and must not be
16  *    misrepresented as being the original software.
17  *
18  * 3. This notice may not be removed or altered from any source distribution.
19  *
20  * $Date:        6. September 2017
21  * $Revision:    V1.5.0
22  *
23  * Project:      RTE Device Configuration for ST STM32F7xx
24  * -------------------------------------------------------------------------- */
25
26 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
27
28 #ifndef __RTE_DEVICE_H
29 #define __RTE_DEVICE_H
30
31
32 #define GPIO_PORT0      GPIOA
33 #define GPIO_PORT1      GPIOB
34 #define GPIO_PORT2      GPIOC
35 #define GPIO_PORT3      GPIOD
36 #define GPIO_PORT4      GPIOE
37 #define GPIO_PORT5      GPIOF
38 #define GPIO_PORT6      GPIOG
39 #define GPIO_PORT7      GPIOH
40 #define GPIO_PORT8      GPIOI
41 #define GPIO_PORT9      GPIOJ
42 #define GPIO_PORT10     GPIOK
43
44 #define GPIO_PORT(num)  GPIO_PORT##num
45
46
47 // <e> USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_USART1]
48 // <i> Configuration settings for Driver_USART1 in component ::CMSIS Driver:USART
49 #define RTE_USART1                      0
50
51 //   <o> USART1_TX Pin <0=>Not Used <1=>PA9 <2=>PB6 <3=>PB14
52 #define RTE_USART1_TX_ID                0
53 #if    (RTE_USART1_TX_ID == 0)
54 #define RTE_USART1_TX                   0
55 #elif  (RTE_USART1_TX_ID == 1)
56 #define RTE_USART1_TX                   1
57 #define RTE_USART1_TX_PORT              GPIOA
58 #define RTE_USART1_TX_BIT               9
59 #elif  (RTE_USART1_TX_ID == 2)
60 #define RTE_USART1_TX                   1
61 #define RTE_USART1_TX_PORT              GPIOB
62 #define RTE_USART1_TX_BIT               6
63 #elif  (RTE_USART1_TX_ID == 3)
64 #define RTE_USART1_TX                   1
65 #define RTE_USART1_TX_PORT              GPIOB
66 #define RTE_USART1_TX_BIT               14
67 #else
68 #error "Invalid USART1_TX Pin Configuration!"
69 #endif
70
71 //   <o> USART1_RX Pin <0=>Not Used <1=>PA10 <2=>PB7 <3=>PB15
72 #define RTE_USART1_RX_ID                0
73 #if    (RTE_USART1_RX_ID == 0)
74 #define RTE_USART1_RX                   0
75 #elif  (RTE_USART1_RX_ID == 1)
76 #define RTE_USART1_RX                   1
77 #define RTE_USART1_RX_PORT              GPIOA
78 #define RTE_USART1_RX_BIT               10
79 #elif  (RTE_USART1_RX_ID == 2)
80 #define RTE_USART1_RX                   1
81 #define RTE_USART1_RX_PORT              GPIOB
82 #define RTE_USART1_RX_BIT               7
83 #elif  (RTE_USART1_RX_ID == 3)
84 #define RTE_USART1_RX                   1
85 #define RTE_USART1_RX_PORT              GPIOB
86 #define RTE_USART1_RX_BIT               15
87 #else
88 #error "Invalid USART1_RX Pin Configuration!"
89 #endif
90
91 //   <o> USART1_CK Pin <0=>Not Used <1=>PA8
92 #define RTE_USART1_CK_ID                0
93 #if    (RTE_USART1_CK_ID == 0)
94 #define RTE_USART1_CK                   0
95 #elif  (RTE_USART1_CK_ID == 1)
96 #define RTE_USART1_CK                   1
97 #define RTE_USART1_CK_PORT              GPIOA
98 #define RTE_USART1_CK_BIT               8
99 #else
100 #error "Invalid USART1_CK Pin Configuration!"
101 #endif
102
103 //   <o> USART1_CTS Pin <0=>Not Used <1=>PA11
104 #define RTE_USART1_CTS_ID               0
105 #if    (RTE_USART1_CTS_ID == 0)
106 #define RTE_USART1_CTS                  0
107 #elif  (RTE_USART1_CTS_ID == 1)
108 #define RTE_USART1_CTS                  1
109 #define RTE_USART1_CTS_PORT             GPIOA
110 #define RTE_USART1_CTS_BIT              11
111 #else
112 #error "Invalid USART1_CTS Pin Configuration!"
113 #endif
114
115 //   <o> USART1_RTS Pin <0=>Not Used <1=>PA12
116 #define RTE_USART1_RTS_ID               0
117 #if    (RTE_USART1_RTS_ID == 0)
118 #define RTE_USART1_RTS                  0
119 #elif  (RTE_USART1_RTS_ID == 1)
120 #define RTE_USART1_RTS                  1
121 #define RTE_USART1_RTS_PORT             GPIOA
122 #define RTE_USART1_RTS_BIT              12
123 #else
124 #error "Invalid USART1_RTS Pin Configuration!"
125 #endif
126
127 //   <e> DMA Rx
128 //     <o1> Number <2=>2
129 //     <i>  Selects DMA Number (only DMA2 can be used)
130 //     <o2> Stream <2=>2 <5=>5
131 //     <i>  Selects DMA Stream (only Stream 2 or 5 can be used)
132 //     <o3> Channel <4=>4
133 //     <i>  Selects DMA Channel (only Channel 4 can be used)
134 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
135 //     <i>  Selects DMA Priority
136 //   </e>
137 #define RTE_USART1_RX_DMA               0
138 #define RTE_USART1_RX_DMA_NUMBER        2
139 #define RTE_USART1_RX_DMA_STREAM        2
140 #define RTE_USART1_RX_DMA_CHANNEL       4
141 #define RTE_USART1_RX_DMA_PRIORITY      0
142
143 //   <e> DMA Tx
144 //     <o1> Number <2=>2
145 //     <i>  Selects DMA Number (only DMA2 can be used)
146 //     <o2> Stream <7=>7
147 //     <i>  Selects DMA Stream (only Stream 7 can be used)
148 //     <o3> Channel <4=>4
149 //     <i>  Selects DMA Channel (only Channel 4 can be used)
150 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
151 //     <i>  Selects DMA Priority
152 //   </e>
153 #define RTE_USART1_TX_DMA               0
154 #define RTE_USART1_TX_DMA_NUMBER        2
155 #define RTE_USART1_TX_DMA_STREAM        7
156 #define RTE_USART1_TX_DMA_CHANNEL       4
157 #define RTE_USART1_TX_DMA_PRIORITY      0
158
159 // </e>
160
161
162 // <e> USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_USART2]
163 // <i> Configuration settings for Driver_USART2 in component ::CMSIS Driver:USART
164 #define RTE_USART2                      0
165
166 //   <o> USART2_TX Pin <0=>Not Used <1=>PA2 <2=>PD5
167 #define RTE_USART2_TX_ID                0
168 #if    (RTE_USART2_TX_ID == 0)
169 #define RTE_USART2_TX                   0
170 #elif  (RTE_USART2_TX_ID == 1)
171 #define RTE_USART2_TX                   1
172 #define RTE_USART2_TX_PORT              GPIOA
173 #define RTE_USART2_TX_BIT               2
174 #elif  (RTE_USART2_TX_ID == 2)
175 #define RTE_USART2_TX                   1
176 #define RTE_USART2_TX_PORT              GPIOD
177 #define RTE_USART2_TX_BIT               5
178 #else
179 #error "Invalid USART2_TX Pin Configuration!"
180 #endif
181
182 //   <o> USART2_RX Pin <0=>Not Used <1=>PA3 <2=>PD6
183 #define RTE_USART2_RX_ID                0
184 #if    (RTE_USART2_RX_ID == 0)
185 #define RTE_USART2_RX                   0
186 #elif  (RTE_USART2_RX_ID == 1)
187 #define RTE_USART2_RX                   1
188 #define RTE_USART2_RX_PORT              GPIOA
189 #define RTE_USART2_RX_BIT               3
190 #elif  (RTE_USART2_RX_ID == 2)
191 #define RTE_USART2_RX                   1
192 #define RTE_USART2_RX_PORT              GPIOD
193 #define RTE_USART2_RX_BIT               6
194 #else
195 #error "Invalid USART2_RX Pin Configuration!"
196 #endif
197
198 //   <o> USART2_CK Pin <0=>Not Used <1=>PA4 <2=>PD7
199 #define RTE_USART2_CK_ID                0
200 #if    (RTE_USART2_CK_ID == 0)  
201 #define RTE_USART2_CK                   0
202 #elif  (RTE_USART2_CK_ID == 1)
203 #define RTE_USART2_CK                   1
204 #define RTE_USART2_CK_PORT              GPIOA
205 #define RTE_USART2_CK_BIT               4
206 #elif  (RTE_USART2_CK_ID == 2)
207 #define RTE_USART2_CK                   1
208 #define RTE_USART2_CK_PORT              GPIOD
209 #define RTE_USART2_CK_BIT               7
210 #else
211 #error "Invalid USART2_CK Pin Configuration!"
212 #endif
213
214 //   <o> USART2_CTS Pin <0=>Not Used <1=>PA0 <2=>PD3
215 #define RTE_USART2_CTS_ID               0
216 #if    (RTE_USART2_CTS_ID == 0)
217 #define RTE_USART2_CTS                  0
218 #elif  (RTE_USART2_CTS_ID == 1)
219 #define RTE_USART2_CTS                  1
220 #define RTE_USART2_CTS_PORT             GPIOA
221 #define RTE_USART2_CTS_BIT              0
222 #elif  (RTE_USART2_CTS_ID == 2)
223 #define RTE_USART2_CTS                  1
224 #define RTE_USART2_CTS_PORT             GPIOD
225 #define RTE_USART2_CTS_BIT              3
226 #else
227 #error "Invalid USART2_CTS Pin Configuration!"
228 #endif
229
230 //   <o> USART2_RTS Pin <0=>Not Used <1=>PA1 <2=>PD4
231 #define RTE_USART2_RTS_ID               0
232 #if    (RTE_USART2_RTS_ID == 0)
233 #define RTE_USART2_RTS                  0
234 #elif  (RTE_USART2_RTS_ID == 1)
235 #define RTE_USART2_RTS                  1
236 #define RTE_USART2_RTS_PORT             GPIOA
237 #define RTE_USART2_RTS_BIT              1
238 #elif  (RTE_USART2_RTS_ID == 2)
239 #define RTE_USART2_RTS                  1
240 #define RTE_USART2_RTS_PORT             GPIOD
241 #define RTE_USART2_RTS_BIT              4
242 #else
243 #error "Invalid USART2_RTS Pin Configuration!"
244 #endif
245
246 //   <e> DMA Rx
247 //     <o1> Number <1=>1
248 //     <i>  Selects DMA Number (only DMA1 can be used)
249 //     <o2> Stream <5=>5
250 //     <i>  Selects DMA Stream (only Stream 5 can be used)
251 //     <o3> Channel <4=>4
252 //     <i>  Selects DMA Channel (only Channel 4 can be used)
253 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
254 //     <i>  Selects DMA Priority
255 //   </e>
256 #define RTE_USART2_RX_DMA               0
257 #define RTE_USART2_RX_DMA_NUMBER        1
258 #define RTE_USART2_RX_DMA_STREAM        5
259 #define RTE_USART2_RX_DMA_CHANNEL       4
260 #define RTE_USART2_RX_DMA_PRIORITY      0
261
262 //   <e> DMA Tx
263 //     <o1> Number <1=>1
264 //     <i>  Selects DMA Number (only DMA1 can be used)
265 //     <o2> Stream <6=>6
266 //     <i>  Selects DMA Stream (only Stream 6 can be used)
267 //     <o3> Channel <4=>4
268 //     <i>  Selects DMA Channel (only Channel 4 can be used)
269 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
270 //     <i>  Selects DMA Priority
271 //   </e>
272 #define RTE_USART2_TX_DMA               0
273 #define RTE_USART2_TX_DMA_NUMBER        1
274 #define RTE_USART2_TX_DMA_STREAM        6
275 #define RTE_USART2_TX_DMA_CHANNEL       4
276 #define RTE_USART2_TX_DMA_PRIORITY      0
277
278 // </e>
279
280
281 // <e> USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_USART3]
282 // <i> Configuration settings for Driver_USART3 in component ::CMSIS Driver:USART
283 #define RTE_USART3                      0
284
285 //   <o> USART3_TX Pin <0=>Not Used <1=>PB10 <2=>PC10 <3=>PD8
286 #define RTE_USART3_TX_ID                0
287 #if    (RTE_USART3_TX_ID == 0)
288 #define RTE_USART3_TX                   0
289 #elif  (RTE_USART3_TX_ID == 1)
290 #define RTE_USART3_TX                   1
291 #define RTE_USART3_TX_PORT              GPIOB
292 #define RTE_USART3_TX_BIT               10
293 #elif  (RTE_USART3_TX_ID == 2)
294 #define RTE_USART3_TX                   1
295 #define RTE_USART3_TX_PORT              GPIOC
296 #define RTE_USART3_TX_BIT               10
297 #elif  (RTE_USART3_TX_ID == 3)
298 #define RTE_USART3_TX                   1
299 #define RTE_USART3_TX_PORT              GPIOD
300 #define RTE_USART3_TX_BIT               8
301 #else
302 #error "Invalid USART3_TX Pin Configuration!"
303 #endif
304
305 //   <o> USART3_RX Pin <0=>Not Used <1=>PB11 <2=>PC11 <3=>PD9
306 #define RTE_USART3_RX_ID                0
307 #if    (RTE_USART3_RX_ID == 0)
308 #define RTE_USART3_RX                   0
309 #elif  (RTE_USART3_RX_ID == 1)
310 #define RTE_USART3_RX                   1
311 #define RTE_USART3_RX_PORT              GPIOB
312 #define RTE_USART3_RX_BIT               11
313 #elif  (RTE_USART3_RX_ID == 2)
314 #define RTE_USART3_RX                   1
315 #define RTE_USART3_RX_PORT              GPIOC
316 #define RTE_USART3_RX_BIT               11
317 #elif  (RTE_USART3_RX_ID == 3)
318 #define RTE_USART3_RX                   1
319 #define RTE_USART3_RX_PORT              GPIOD
320 #define RTE_USART3_RX_BIT               9
321 #else
322 #error "Invalid USART3_RX Pin Configuration!"
323 #endif
324
325 //   <o> USART3_CK Pin <0=>Not Used <1=>PB12 <2=>PC12 <3=>PD10
326 #define RTE_USART3_CK_ID                0
327 #if    (RTE_USART3_CK_ID == 0)
328 #define RTE_USART3_CK                   0
329 #elif  (RTE_USART3_CK_ID == 1)
330 #define RTE_USART3_CK                   1
331 #define RTE_USART3_CK_PORT              GPIOB
332 #define RTE_USART3_CK_BIT               12
333 #elif  (RTE_USART3_CK_ID == 2)
334 #define RTE_USART3_CK                   1
335 #define RTE_USART3_CK_PORT              GPIOC
336 #define RTE_USART3_CK_BIT               12
337 #elif  (RTE_USART3_CK_ID == 3)
338 #define RTE_USART3_CK                   1
339 #define RTE_USART3_CK_PORT              GPIOD
340 #define RTE_USART3_CK_BIT               10
341 #else
342 #error "Invalid USART3_CK Pin Configuration!"
343 #endif
344
345 //   <o> USART3_CTS Pin <0=>Not Used <1=>PB13 <2=>PD11
346 #define RTE_USART3_CTS_ID               0
347 #if    (RTE_USART3_CTS_ID == 0)
348 #define RTE_USART3_CTS                  0
349 #elif  (RTE_USART3_CTS_ID == 1)
350 #define RTE_USART3_CTS                  1
351 #define RTE_USART3_CTS_PORT             GPIOB
352 #define RTE_USART3_CTS_BIT              13
353 #elif  (RTE_USART3_CTS_ID == 2)
354 #define RTE_USART3_CTS                  1
355 #define RTE_USART3_CTS_PORT             GPIOD
356 #define RTE_USART3_CTS_BIT              11
357 #else
358 #error "Invalid USART3_CTS Pin Configuration!"
359 #endif
360
361 //   <o> USART3_RTS Pin <0=>Not Used <1=>PB14 <2=>PD12
362 #define RTE_USART3_RTS_ID               0
363 #if    (RTE_USART3_RTS_ID == 0)
364 #define RTE_USART3_RTS                  0
365 #elif  (RTE_USART3_RTS_ID == 1)
366 #define RTE_USART3_RTS                  1
367 #define RTE_USART3_RTS_PORT             GPIOB
368 #define RTE_USART3_RTS_BIT              14
369 #elif  (RTE_USART3_RTS_ID == 2)
370 #define RTE_USART3_RTS                  1
371 #define RTE_USART3_RTS_PORT             GPIOD
372 #define RTE_USART3_RTS_BIT              12
373 #else
374 #error "Invalid USART3_RTS Pin Configuration!"
375 #endif
376
377 //   <e> DMA Rx
378 //     <o1> Number <1=>1
379 //     <i>  Selects DMA Number (only DMA1 can be used)
380 //     <o2> Stream <1=>1
381 //     <i>  Selects DMA Stream (only Stream 1 can be used)
382 //     <o3> Channel <4=>4
383 //     <i>  Selects DMA Channel (only Channel 4 can be used)
384 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
385 //     <i>  Selects DMA Priority
386 //   </e>
387 #define RTE_USART3_RX_DMA               0
388 #define RTE_USART3_RX_DMA_NUMBER        1
389 #define RTE_USART3_RX_DMA_STREAM        1
390 #define RTE_USART3_RX_DMA_CHANNEL       4
391 #define RTE_USART3_RX_DMA_PRIORITY      0
392
393 //   <e> DMA Tx
394 //     <o1> Number <1=>1
395 //     <i>  Selects DMA Number (only DMA1 can be used)
396 //     <o2> Stream <3=>3 <4=>4 
397 //     <i>  Selects DMA Stream (only Stream 3 or 4 can be used)
398 //     <o3> Channel <4=>4 <7=>7
399 //     <i>  Selects DMA Channel (only Channel 4 or 7 can be used)
400 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
401 //     <i>  Selects DMA Priority
402 //   </e>
403 #define RTE_USART3_TX_DMA               0
404 #define RTE_USART3_TX_DMA_NUMBER        1
405 #define RTE_USART3_TX_DMA_STREAM        3
406 #define RTE_USART3_TX_DMA_CHANNEL       4
407 #define RTE_USART3_TX_DMA_PRIORITY      0
408
409 // </e>
410
411
412 // <e> UART4 (Universal asynchronous receiver transmitter) [Driver_USART4]
413 // <i> Configuration settings for Driver_USART4 in component ::CMSIS Driver:USART
414 #define RTE_UART4                       0
415
416 //   <o> UART4_TX Pin <0=>Not Used <1=>PA0 <2=>PC10 <3=>PA12 <4=>PD1 <5=>PH13
417 #define RTE_UART4_TX_ID                 0
418 #if    (RTE_UART4_TX_ID == 0)
419 #define RTE_UART4_TX                    0
420 #elif  (RTE_UART4_TX_ID == 1)
421 #define RTE_UART4_TX                    1
422 #define RTE_UART4_TX_PORT               GPIOA
423 #define RTE_UART4_TX_BIT                0
424 #elif  (RTE_UART4_TX_ID == 2)
425 #define RTE_UART4_TX                    1
426 #define RTE_UART4_TX_PORT               GPIOC
427 #define RTE_UART4_TX_BIT                10
428 #elif  (RTE_UART4_TX_ID == 3)
429 #define RTE_UART4_TX                    1
430 #define RTE_UART4_TX_PORT               GPIOA
431 #define RTE_UART4_TX_BIT                12
432 #elif  (RTE_UART4_TX_ID == 4)
433 #define RTE_UART4_TX                    1
434 #define RTE_UART4_TX_PORT               GPIOD
435 #define RTE_UART4_TX_BIT                1
436 #elif  (RTE_UART4_TX_ID == 5)
437 #define RTE_UART4_TX                    1
438 #define RTE_UART4_TX_PORT               GPIOH
439 #define RTE_UART4_TX_BIT                13
440 #else
441 #error "Invalid UART4_TX Pin Configuration!"
442 #endif
443
444 //   <o> UART4_RX Pin <0=>Not Used <1=>PA1 <2=>PC11 <3=>PA11 <4=>PD0 <5=>PH14 <6=>PI9
445 #define RTE_UART4_RX_ID                 0
446 #if    (RTE_UART4_RX_ID == 0)
447 #define RTE_UART4_RX                    0
448 #elif  (RTE_UART4_RX_ID == 1)
449 #define RTE_UART4_RX                    1
450 #define RTE_UART4_RX_PORT               GPIOA
451 #define RTE_UART4_RX_BIT                1
452 #elif  (RTE_UART4_RX_ID == 2)
453 #define RTE_UART4_RX                    1
454 #define RTE_UART4_RX_PORT               GPIOC
455 #define RTE_UART4_RX_BIT                11
456 #elif  (RTE_UART4_RX_ID == 3)
457 #define RTE_UART4_RX                    1
458 #define RTE_UART4_RX_PORT               GPIOA
459 #define RTE_UART4_RX_BIT                11
460 #elif  (RTE_UART4_RX_ID == 4)
461 #define RTE_UART4_RX                    1
462 #define RTE_UART4_RX_PORT               GPIOD
463 #define RTE_UART4_RX_BIT                0
464 #elif  (RTE_UART4_RX_ID == 5)
465 #define RTE_UART4_RX                    1
466 #define RTE_UART4_RX_PORT               GPIOH
467 #define RTE_UART4_RX_BIT                14
468 #elif  (RTE_UART4_RX_ID == 6)
469 #define RTE_UART4_RX                    1
470 #define RTE_UART4_RX_PORT               GPIOI
471 #define RTE_UART4_RX_BIT                9
472 #else
473 #error "Invalid UART4_RX Pin Configuration!"
474 #endif
475
476 //   <o> UART4_CTS Pin <0=>Not Used <1=>PB0 <2=>PB15
477 #define RTE_UART4_CTS_ID                0
478 #if    (RTE_UART4_CTS_ID == 0)
479 #define RTE_UART4_CTS                   0
480 #elif  (RTE_UART4_CTS_ID == 1)
481 #define RTE_UART4_CTS                   1
482 #define RTE_UART4_CTS_PORT              GPIOB
483 #define RTE_UART4_CTS_BIT               0
484 #elif  (RTE_UART4_CTS_ID == 2)
485 #define RTE_UART4_CTS                   1
486 #define RTE_UART4_CTS_PORT              GPIOB
487 #define RTE_UART4_CTS_BIT               15
488 #else
489 #error "Invalid UART4_CTS Pin Configuration!"
490 #endif
491
492 //   <o> UART4_RTS Pin <0=>Not Used <1=>PA15 <2=>PB14
493 #define RTE_UART4_RTS_ID                0
494 #if    (RTE_UART4_RTS_ID == 0)
495 #define RTE_UART4_RTS                   0
496 #elif  (RTE_UART4_RTS_ID == 1)
497 #define RTE_UART4_RTS                   1
498 #define RTE_UART4_RTS_PORT              GPIOA
499 #define RTE_UART4_RTS_BIT               15
500 #elif  (RTE_UART4_RTS_ID == 2)
501 #define RTE_UART4_RTS                   1
502 #define RTE_UART4_RTS_PORT              GPIOB
503 #define RTE_UART4_RTS_BIT               14
504 #else
505 #error "Invalid UART4_RTS Pin Configuration!"
506 #endif
507
508 //   <e> DMA Rx
509 //     <o1> Number <1=>1
510 //     <i>  Selects DMA Number (only DMA1 can be used)
511 //     <o2> Stream <2=>2
512 //     <i>  Selects DMA Stream (only Stream 2 can be used)
513 //     <o3> Channel <4=>4
514 //     <i>  Selects DMA Channel (only Channel 4 can be used)
515 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
516 //     <i>  Selects DMA Priority
517 //   </e>
518 #define RTE_UART4_RX_DMA                0
519 #define RTE_UART4_RX_DMA_NUMBER         1
520 #define RTE_UART4_RX_DMA_STREAM         2
521 #define RTE_UART4_RX_DMA_CHANNEL        4
522 #define RTE_UART4_RX_DMA_PRIORITY       0
523
524 //   <e> DMA Tx
525 //     <o1> Number <1=>1
526 //     <i>  Selects DMA Number (only DMA1 can be used)
527 //     <o2> Stream <4=>4
528 //     <i>  Selects DMA Stream (only Stream 4 can be used)
529 //     <o3> Channel <4=>4
530 //     <i>  Selects DMA Channel (only Channel 4 can be used)
531 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
532 //     <i>  Selects DMA Priority
533 //   </e>
534 #define RTE_UART4_TX_DMA                0
535 #define RTE_UART4_TX_DMA_NUMBER         1
536 #define RTE_UART4_TX_DMA_STREAM         4
537 #define RTE_UART4_TX_DMA_CHANNEL        4
538 #define RTE_UART4_TX_DMA_PRIORITY       0
539
540 // </e>
541
542
543 // <e> UART5 (Universal asynchronous receiver transmitter) [Driver_USART5]
544 // <i> Configuration settings for Driver_USART5 in component ::CMSIS Driver:USART
545 #define RTE_UART5                       0
546
547 //   <o> UART5_TX Pin <0=>Not Used <1=>PC12 <2=>PB6 <3=>PB9 <4=>PB13
548 #define RTE_UART5_TX_ID                 0
549 #if    (RTE_UART5_TX_ID == 0)
550 #define RTE_UART5_TX                    0
551 #elif  (RTE_UART5_TX_ID == 1)
552 #define RTE_UART5_TX                    1
553 #define RTE_UART5_TX_PORT               GPIOC
554 #define RTE_UART5_TX_BIT                12
555 #elif  (RTE_UART5_TX_ID == 2)
556 #define RTE_UART5_TX                    1
557 #define RTE_UART5_TX_PORT               GPIOB
558 #define RTE_UART5_TX_BIT                6
559 #elif  (RTE_UART5_TX_ID == 3)
560 #define RTE_UART5_TX                    1
561 #define RTE_UART5_TX_PORT               GPIOB
562 #define RTE_UART5_TX_BIT                9
563 #elif  (RTE_UART5_TX_ID == 4)
564 #define RTE_UART5_TX                    1
565 #define RTE_UART5_TX_PORT               GPIOB
566 #define RTE_UART5_TX_BIT                13
567 #else
568 #error "Invalid UART5_TX Pin Configuration!"
569 #endif
570
571 //   <o> UART5_RX Pin <0=>Not Used <1=>PD2 <2=>PB5 <3=>PB8 <4=>PB12
572 #define RTE_UART5_RX_ID                 0
573 #if    (RTE_UART5_RX_ID == 0)
574 #define RTE_UART5_RX                    0
575 #elif  (RTE_UART5_RX_ID == 1)
576 #define RTE_UART5_RX                    1
577 #define RTE_UART5_RX_PORT               GPIOD
578 #define RTE_UART5_RX_BIT                2
579 #elif  (RTE_UART5_RX_ID == 2)
580 #define RTE_UART5_RX                    1
581 #define RTE_UART5_RX_PORT               GPIOB
582 #define RTE_UART5_RX_BIT                5
583 #elif  (RTE_UART5_RX_ID == 3)
584 #define RTE_UART5_RX                    1
585 #define RTE_UART5_RX_PORT               GPIOB
586 #define RTE_UART5_RX_BIT                8
587 #elif  (RTE_UART5_RX_ID == 4)
588 #define RTE_UART5_RX                    1
589 #define RTE_UART5_RX_PORT               GPIOB
590 #define RTE_UART5_RX_BIT                12
591 #else
592 #error "Invalid UART5_RX Pin Configuration!"
593 #endif
594
595 //   <o> UART5_CTS Pin <0=>Not Used <1=>PC9
596 #define RTE_UART5_CTS_ID                0
597 #if    (RTE_UART5_CTS_ID == 0)
598 #define RTE_UART5_CTS                   0
599 #elif  (RTE_UART5_CTS_ID == 1)
600 #define RTE_UART5_CTS                   1
601 #define RTE_UART5_CTS_PORT              GPIOC
602 #define RTE_UART5_CTS_BIT               9
603 #else
604 #error "Invalid UART5_CTS Pin Configuration!"
605 #endif
606
607 //   <o> UART5_RTS Pin <0=>Not Used <1=>PC8
608 #define RTE_UART5_RTS_ID                0
609 #if    (RTE_UART5_RTS_ID == 0)
610 #define RTE_UART5_RTS                   0
611 #elif  (RTE_UART5_RTS_ID == 1)
612 #define RTE_UART5_RTS                   1
613 #define RTE_UART5_RTS_PORT              GPIOC
614 #define RTE_UART5_RTS_BIT               8
615 #else
616 #error "Invalid UART5_RTS Pin Configuration!"
617 #endif
618
619 //   <e> DMA Rx
620 //     <o1> Number <1=>1
621 //     <i>  Selects DMA Number (only DMA1 can be used)
622 //     <o2> Stream <0=>0
623 //     <i>  Selects DMA Stream (only Stream 0 can be used)
624 //     <o3> Channel <4=>4
625 //     <i>  Selects DMA Channel (only Channel 4 can be used)
626 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
627 //     <i>  Selects DMA Priority
628 //   </e>
629 #define RTE_UART5_RX_DMA                0
630 #define RTE_UART5_RX_DMA_NUMBER         1
631 #define RTE_UART5_RX_DMA_STREAM         0
632 #define RTE_UART5_RX_DMA_CHANNEL        4
633 #define RTE_UART5_RX_DMA_PRIORITY       0
634
635 //   <e> DMA Tx
636 //     <o1> Number <1=>1
637 //     <i>  Selects DMA Number (only DMA1 can be used)
638 //     <o2> Stream <7=>7
639 //     <i>  Selects DMA Stream (only Stream 7 can be used)
640 //     <o3> Channel <4=>4
641 //     <i>  Selects DMA Channel (only Channel 4 can be used)
642 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
643 //     <i>  Selects DMA Priority
644 //   </e>
645 #define RTE_UART5_TX_DMA                0
646 #define RTE_UART5_TX_DMA_NUMBER         1
647 #define RTE_UART5_TX_DMA_STREAM         7
648 #define RTE_UART5_TX_DMA_CHANNEL        4
649 #define RTE_UART5_TX_DMA_PRIORITY       0
650
651 // </e>
652
653
654 // <e> USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_USART6]
655 // <i> Configuration settings for Driver_USART6 in component ::CMSIS Driver:USART
656 #define RTE_USART6                      1
657
658 //   <o> USART6_TX Pin <0=>Not Used <1=>PC6 <2=>PG14
659 #define RTE_USART6_TX_ID                1
660 #if    (RTE_USART6_TX_ID == 0)
661 #define RTE_USART6_TX                   0
662 #elif  (RTE_USART6_TX_ID == 1)
663 #define RTE_USART6_TX                   1
664 #define RTE_USART6_TX_PORT              GPIOC
665 #define RTE_USART6_TX_BIT               6
666 #elif  (RTE_USART6_TX_ID == 2)
667 #define RTE_USART6_TX                   1
668 #define RTE_USART6_TX_PORT              GPIOG
669 #define RTE_USART6_TX_BIT               14
670 #else
671 #error "Invalid USART6_TX Pin Configuration!"
672 #endif
673
674 //   <o> USART6_RX Pin <0=>Not Used <1=>PC7 <2=>PG9
675 #define RTE_USART6_RX_ID                1
676 #if    (RTE_USART6_RX_ID == 0)
677 #define RTE_USART6_RX                   0
678 #elif  (RTE_USART6_RX_ID == 1)
679 #define RTE_USART6_RX                   1
680 #define RTE_USART6_RX_PORT              GPIOC
681 #define RTE_USART6_RX_BIT               7
682 #elif  (RTE_USART6_RX_ID == 2)
683 #define RTE_USART6_RX                   1
684 #define RTE_USART6_RX_PORT              GPIOG
685 #define RTE_USART6_RX_BIT               9
686 #else
687 #error "Invalid USART6_RX Pin Configuration!"
688 #endif
689
690 //   <o> USART6_CK Pin <0=>Not Used <1=>PC8 <2=>PG7
691 #define RTE_USART6_CK_ID                0
692 #if    (RTE_USART6_CK_ID == 0)
693 #define RTE_USART6_CK                   0
694 #elif  (RTE_USART6_CK_ID == 1)
695 #define RTE_USART6_CK                   1
696 #define RTE_USART6_CK_PORT              GPIOC
697 #define RTE_USART6_CK_BIT               8
698 #elif  (RTE_USART6_CK_ID == 2)
699 #define RTE_USART6_CK                   1
700 #define RTE_USART6_CK_PORT              GPIOG
701 #define RTE_USART6_CK_BIT               7
702 #else
703 #error "Invalid USART6_CK Pin Configuration!"
704 #endif
705
706 //   <o> USART6_CTS Pin <0=>Not Used <1=>PG13 <2=>PG15
707 #define RTE_USART6_CTS_ID               0
708 #if    (RTE_USART6_CTS_ID == 0)
709 #define RTE_USART6_CTS                  0
710 #elif  (RTE_USART6_CTS_ID == 1)
711 #define RTE_USART6_CTS                  1
712 #define RTE_USART6_CTS_PORT             GPIOG
713 #define RTE_USART6_CTS_BIT              13
714 #elif  (RTE_USART6_CTS_ID == 2)
715 #define RTE_USART6_CTS                  1
716 #define RTE_USART6_CTS_PORT             GPIOG
717 #define RTE_USART6_CTS_BIT              15
718 #else
719 #error "Invalid USART6_CTS Pin Configuration!"
720 #endif
721
722 //   <o> USART6_RTS Pin <0=>Not Used <1=>PG8 <2=>PG12
723 #define RTE_USART6_RTS_ID               0
724 #if    (RTE_USART6_RTS_ID == 0)
725 #define RTE_USART6_RTS                  0
726 #elif  (RTE_USART6_RTS_ID == 1)
727 #define RTE_USART6_RTS                  1
728 #define RTE_USART6_RTS_PORT             GPIOG
729 #define RTE_USART6_RTS_BIT              8
730 #elif  (RTE_USART6_RTS_ID == 2)
731 #define RTE_USART6_RTS                  1
732 #define RTE_USART6_RTS_PORT             GPIOG
733 #define RTE_USART6_RTS_BIT              12
734 #else
735 #error "Invalid USART6_RTS Pin Configuration!"
736 #endif
737
738 //   <e> DMA Rx
739 //     <o1> Number <2=>2
740 //     <i>  Selects DMA Number (only DMA2 can be used)
741 //     <o2> Stream <1=>1 <2=>2
742 //     <i>  Selects DMA Stream (only Stream 1 or 2 can be used)
743 //     <o3> Channel <5=>5
744 //     <i>  Selects DMA Channel (only Channel 5 can be used)
745 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
746 //     <i>  Selects DMA Priority
747 //   </e>
748 #define RTE_USART6_RX_DMA               0
749 #define RTE_USART6_RX_DMA_NUMBER        2
750 #define RTE_USART6_RX_DMA_STREAM        1
751 #define RTE_USART6_RX_DMA_CHANNEL       5
752 #define RTE_USART6_RX_DMA_PRIORITY      0
753
754 //   <e> DMA Tx
755 //     <o1> Number <2=>2
756 //     <i>  Selects DMA Number (only DMA2 can be used)
757 //     <o2> Stream <6=>6 <7=>7
758 //     <i>  Selects DMA Stream (only Stream 6 or 7 can be used)
759 //     <o3> Channel <5=>5
760 //     <i>  Selects DMA Channel (only Channel 5 can be used)
761 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
762 //     <i>  Selects DMA Priority
763 //   </e>
764 #define RTE_USART6_TX_DMA               0
765 #define RTE_USART6_TX_DMA_NUMBER        2
766 #define RTE_USART6_TX_DMA_STREAM        6
767 #define RTE_USART6_TX_DMA_CHANNEL       5
768 #define RTE_USART6_TX_DMA_PRIORITY      0
769
770 // </e>
771
772 // <e> UART7 (Universal asynchronous receiver transmitter) [Driver_USART7]
773 // <i> Configuration settings for Driver_USART7 in component ::CMSIS Driver:USART
774 #define RTE_UART7                       0
775
776 //   <o> UART7_TX Pin <0=>Not Used <1=>PF7 <2=>PE8 <3=>PA15 <4=>PB4
777 #define RTE_UART7_TX_ID                 0
778 #if    (RTE_UART7_TX_ID == 0)
779 #define RTE_UART7_TX                    0
780 #elif  (RTE_UART7_TX_ID == 1)
781 #define RTE_UART7_TX                    1
782 #define RTE_UART7_TX_PORT               GPIOF
783 #define RTE_UART7_TX_BIT                7
784 #elif  (RTE_UART7_TX_ID == 2)
785 #define RTE_UART7_TX                    1
786 #define RTE_UART7_TX_PORT               GPIOE
787 #define RTE_UART7_TX_BIT                8
788 #elif  (RTE_UART7_TX_ID == 3)
789 #define RTE_UART7_TX                    1
790 #define RTE_UART7_TX_PORT               GPIOA
791 #define RTE_UART7_TX_BIT                15
792 #elif  (RTE_UART7_TX_ID == 4)
793 #define RTE_UART7_TX                    1
794 #define RTE_UART7_TX_PORT               GPIOB
795 #define RTE_UART7_TX_BIT                4
796 #else
797 #error "Invalid UART7_TX Pin Configuration!"
798 #endif
799
800 //   <o> UART7_RX Pin <0=>Not Used <1=>PF6 <2=>PE7 <3=>PA8 <4=>PB3
801 #define RTE_UART7_RX_ID                 0
802 #if    (RTE_UART7_RX_ID == 0)
803 #define RTE_UART7_RX                    0
804 #elif  (RTE_UART7_RX_ID == 1)
805 #define RTE_UART7_RX                    1
806 #define RTE_UART7_RX_PORT               GPIOF
807 #define RTE_UART7_RX_BIT                6
808 #elif  (RTE_UART7_RX_ID == 2)
809 #define RTE_UART7_RX                    1
810 #define RTE_UART7_RX_PORT               GPIOE
811 #define RTE_UART7_RX_BIT                7
812 #elif  (RTE_UART7_RX_ID == 3)
813 #define RTE_UART7_RX                    1
814 #define RTE_UART7_RX_PORT               GPIOA
815 #define RTE_UART7_RX_BIT                8
816 #elif  (RTE_UART7_RX_ID == 4)
817 #define RTE_UART7_RX                    1
818 #define RTE_UART7_RX_PORT               GPIOB
819 #define RTE_UART7_RX_BIT                3
820 #else
821 #error "Invalid UART7_RX Pin Configuration!"
822 #endif
823
824 //   <o> UART7_CTS Pin <0=>Not Used <1=>PF9 <2=>PE10
825 #define RTE_UART7_CTS_ID                0
826 #if    (RTE_UART7_CTS_ID == 0)
827 #define RTE_UART7_CTS                   0
828 #elif  (RTE_UART7_CTS_ID == 1)
829 #define RTE_UART7_CTS                   1
830 #define RTE_UART7_CTS_PORT              GPIOF
831 #define RTE_UART7_CTS_BIT               9
832 #elif  (RTE_UART7_CTS_ID == 2)
833 #define RTE_UART7_CTS                   1
834 #define RTE_UART7_CTS_PORT              GPIOE
835 #define RTE_UART7_CTS_BIT               10
836 #else
837 #error "Invalid UART7_CTS Pin Configuration!"
838 #endif
839
840 //   <o> UART7_RTS Pin <0=>Not Used <1=>PF8 <2=>PE9
841 #define RTE_UART7_RTS_ID                0
842 #if    (RTE_UART7_RTS_ID == 0)
843 #define RTE_UART7_RTS                   0
844 #elif  (RTE_UART7_RTS_ID == 1)
845 #define RTE_UART7_RTS                   1
846 #define RTE_UART7_RTS_PORT              GPIOF
847 #define RTE_UART7_RTS_BIT               8
848 #elif  (RTE_UART7_RTS_ID == 2)
849 #define RTE_UART7_RTS                   1
850 #define RTE_UART7_RTS_PORT              GPIOE
851 #define RTE_UART7_RTS_BIT               9
852 #else
853 #error "Invalid UART7_RTS Pin Configuration!"
854 #endif
855
856 //   <e> DMA Rx
857 //     <o1> Number <1=>1
858 //     <i>  Selects DMA Number (only DMA1 can be used)
859 //     <o2> Stream <3=>3
860 //     <i>  Selects DMA Stream (only Stream 3 can be used)
861 //     <o3> Channel <5=>5
862 //     <i>  Selects DMA Channel (only Channel 5 can be used)
863 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
864 //     <i>  Selects DMA Priority
865 //   </e>
866 #define RTE_UART7_RX_DMA                0
867 #define RTE_UART7_RX_DMA_NUMBER         1
868 #define RTE_UART7_RX_DMA_STREAM         3
869 #define RTE_UART7_RX_DMA_CHANNEL        5
870 #define RTE_UART7_RX_DMA_PRIORITY       0
871
872 //   <e> DMA Tx
873 //     <o1> Number <1=>1
874 //     <i>  Selects DMA Number (only DMA1 can be used)
875 //     <o2> Stream <1=>1
876 //     <i>  Selects DMA Stream (only Stream 1 can be used)
877 //     <o3> Channel <5=>5
878 //     <i>  Selects DMA Channel (only Channel 5 can be used)
879 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
880 //     <i>  Selects DMA Priority
881 //   </e>
882 #define RTE_UART7_TX_DMA                0
883 #define RTE_UART7_TX_DMA_NUMBER         1
884 #define RTE_UART7_TX_DMA_STREAM         1
885 #define RTE_UART7_TX_DMA_CHANNEL        5
886 #define RTE_UART7_TX_DMA_PRIORITY       0
887
888 // </e>
889
890 // <e> UART8 (Universal asynchronous receiver transmitter) [Driver_USART8]
891 // <i> Configuration settings for Driver_USART8 in component ::CMSIS Driver:USART
892 #define RTE_UART8                       0
893
894 //   <o> UART8_TX Pin <0=>Not Used <1=>PE1
895 #define RTE_UART8_TX_ID                 0
896 #if    (RTE_UART8_TX_ID == 0)
897 #define RTE_UART8_TX                    0
898 #elif  (RTE_UART8_TX_ID == 1)
899 #define RTE_UART8_TX                    1
900 #define RTE_UART8_TX_PORT               GPIOE
901 #define RTE_UART8_TX_BIT                1
902 #else
903 #error "Invalid UART8_TX Pin Configuration!"
904 #endif
905
906 //   <o> UART8_RX Pin <0=>Not Used <1=>PE0
907 #define RTE_UART8_RX_ID                 0
908 #if    (RTE_UART8_RX_ID == 0)
909 #define RTE_UART8_RX                    0
910 #elif  (RTE_UART8_RX_ID == 1)
911 #define RTE_UART8_RX                    1
912 #define RTE_UART8_RX_PORT               GPIOE
913 #define RTE_UART8_RX_BIT                0
914 #else
915 #error "Invalid UART8_RX Pin Configuration!"
916 #endif
917
918 //   <o> UART8_CTS Pin <0=>Not Used <1=>PD14
919 #define RTE_UART8_CTS_ID                0
920 #if    (RTE_UART8_CTS_ID == 0)
921 #define RTE_UART8_CTS                   0
922 #elif  (RTE_UART8_CTS_ID == 1)
923 #define RTE_UART8_CTS                   1
924 #define RTE_UART8_CTS_PORT              GPIOD
925 #define RTE_UART8_CTS_BIT               14
926 #else
927 #error "Invalid UART8_CTS Pin Configuration!"
928 #endif
929
930 //   <o> UART8_RTS Pin <0=>Not Used <1=>PD15
931 #define RTE_UART8_RTS_ID                0
932 #if    (RTE_UART8_RTS_ID == 0)
933 #define RTE_UART8_RTS                   0
934 #elif  (RTE_UART8_RTS_ID == 1)
935 #define RTE_UART8_RTS                   1
936 #define RTE_UART8_RTS_PORT              GPIOD
937 #define RTE_UART8_RTS_BIT               15
938 #else
939 #error "Invalid UART8_RTS Pin Configuration!"
940 #endif
941
942 //   <e> DMA Rx
943 //     <o1> Number <1=>1
944 //     <i>  Selects DMA Number (only DMA1 can be used)
945 //     <o2> Stream <6=>6
946 //     <i>  Selects DMA Stream (only Stream 6 can be used)
947 //     <o3> Channel <5=>5
948 //     <i>  Selects DMA Channel (only Channel 5 can be used)
949 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
950 //     <i>  Selects DMA Priority
951 //   </e>
952 #define RTE_UART8_RX_DMA                0
953 #define RTE_UART8_RX_DMA_NUMBER         1
954 #define RTE_UART8_RX_DMA_STREAM         6
955 #define RTE_UART8_RX_DMA_CHANNEL        5
956 #define RTE_UART8_RX_DMA_PRIORITY       0
957
958 //   <e> DMA Tx
959 //     <o1> Number <1=>1
960 //     <i>  Selects DMA Number (only DMA1 can be used)
961 //     <o2> Stream <0=>0
962 //     <i>  Selects DMA Stream (only Stream 0 can be used)
963 //     <o3> Channel <5=>5
964 //     <i>  Selects DMA Channel (only Channel 5 can be used)
965 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
966 //     <i>  Selects DMA Priority
967 //   </e>
968 #define RTE_UART8_TX_DMA                0
969 #define RTE_UART8_TX_DMA_NUMBER         1
970 #define RTE_UART8_TX_DMA_STREAM         0
971 #define RTE_UART8_TX_DMA_CHANNEL        5
972 #define RTE_UART8_TX_DMA_PRIORITY       0
973
974 // </e>
975
976
977 // <e> I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
978 // <i> Configuration settings for Driver_I2C1 in component ::CMSIS Driver:I2C
979 #define RTE_I2C1                        1
980
981 //   <o> I2C1_SCL Pin <0=>PB6 <1=>PB8
982 #define RTE_I2C1_SCL_PORT_ID            0
983 #if    (RTE_I2C1_SCL_PORT_ID == 0)
984 #define RTE_I2C1_SCL_PORT               GPIOB
985 #define RTE_I2C1_SCL_BIT                6
986 #elif  (RTE_I2C1_SCL_PORT_ID == 1)
987 #define RTE_I2C1_SCL_PORT               GPIOB
988 #define RTE_I2C1_SCL_BIT                8
989 #else
990 #error "Invalid I2C1_SCL Pin Configuration!"
991 #endif
992
993 //   <o> I2C1_SDA Pin <0=>PB7 <1=>PB9
994 #define RTE_I2C1_SDA_PORT_ID            0
995 #if    (RTE_I2C1_SDA_PORT_ID == 0)
996 #define RTE_I2C1_SDA_PORT               GPIOB
997 #define RTE_I2C1_SDA_BIT                7
998 #elif  (RTE_I2C1_SDA_PORT_ID == 1)
999 #define RTE_I2C1_SDA_PORT               GPIOB
1000 #define RTE_I2C1_SDA_BIT                9
1001 #else
1002 #error "Invalid I2C1_SDA Pin Configuration!"
1003 #endif
1004
1005 //   <e> DMA Rx
1006 //     <o1> Number <1=>1
1007 //     <i>  Selects DMA Number (only DMA1 can be used)
1008 //     <o2> Stream <0=>0 <5=>5
1009 //     <i>  Selects DMA Stream (only Stream 0 or 5 can be used)
1010 //     <o3> Channel <1=>1
1011 //     <i>  Selects DMA Channel (only Channel 1 can be used)
1012 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1013 //     <i>  Selects DMA Priority
1014 //   </e>
1015 #define RTE_I2C1_RX_DMA                 1
1016 #define RTE_I2C1_RX_DMA_NUMBER          1
1017 #define RTE_I2C1_RX_DMA_STREAM          0
1018 #define RTE_I2C1_RX_DMA_CHANNEL         1
1019 #define RTE_I2C1_RX_DMA_PRIORITY        0
1020
1021 //   <e> DMA Tx
1022 //     <o1> Number <1=>1
1023 //     <i>  Selects DMA Number (only DMA1 can be used)
1024 //     <o2> Stream <6=>6 <7=>7
1025 //     <i>  Selects DMA Stream (only Stream 6 or 7 can be used)
1026 //     <o3> Channel <1=>1
1027 //     <i>  Selects DMA Channel (only Channel 1 can be used)
1028 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1029 //     <i>  Selects DMA Priority
1030 //   </e>
1031 #define RTE_I2C1_TX_DMA                 1
1032 #define RTE_I2C1_TX_DMA_NUMBER          1
1033 #define RTE_I2C1_TX_DMA_STREAM          6
1034 #define RTE_I2C1_TX_DMA_CHANNEL         1
1035 #define RTE_I2C1_TX_DMA_PRIORITY        0
1036
1037 // </e>
1038
1039
1040 // <e> I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2]
1041 // <i> Configuration settings for Driver_I2C2 in component ::CMSIS Driver:I2C
1042 #define RTE_I2C2                        0
1043
1044 //   <o> I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10
1045 #define RTE_I2C2_SCL_PORT_ID            0
1046 #if    (RTE_I2C2_SCL_PORT_ID == 0)
1047 #define RTE_I2C2_SCL_PORT               GPIOF
1048 #define RTE_I2C2_SCL_BIT                1
1049 #elif  (RTE_I2C2_SCL_PORT_ID == 1)
1050 #define RTE_I2C2_SCL_PORT               GPIOH
1051 #define RTE_I2C2_SCL_BIT                4
1052 #elif  (RTE_I2C2_SCL_PORT_ID == 2)
1053 #define RTE_I2C2_SCL_PORT               GPIOB
1054 #define RTE_I2C2_SCL_BIT                10
1055 #else
1056 #error "Invalid I2C2_SCL Pin Configuration!"
1057 #endif
1058
1059 //   <o> I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 <3=>PB3 <4=>PB9
1060 #define RTE_I2C2_SDA_PORT_ID            0
1061 #if    (RTE_I2C2_SDA_PORT_ID == 0)
1062 #define RTE_I2C2_SDA_PORT               GPIOF
1063 #define RTE_I2C2_SDA_BIT                0
1064 #elif  (RTE_I2C2_SDA_PORT_ID == 1)
1065 #define RTE_I2C2_SDA_PORT               GPIOH
1066 #define RTE_I2C2_SDA_BIT                5
1067 #elif  (RTE_I2C2_SDA_PORT_ID == 2)
1068 #define RTE_I2C2_SDA_PORT               GPIOB
1069 #define RTE_I2C2_SDA_BIT                11
1070 #elif  (RTE_I2C2_SDA_PORT_ID == 3)
1071 #define RTE_I2C2_SDA_PORT               GPIOB
1072 #define RTE_I2C2_SDA_BIT                3
1073 #elif  (RTE_I2C2_SDA_PORT_ID == 4)
1074 #define RTE_I2C2_SDA_PORT               GPIOB
1075 #define RTE_I2C2_SDA_BIT                9
1076 #else
1077 #error "Invalid I2C2_SDA Pin Configuration!"
1078 #endif
1079
1080 //   <e> DMA Rx
1081 //     <o1> Number <1=>1
1082 //     <i>  Selects DMA Number (only DMA1 can be used)
1083 //     <o2> Stream <2=>2 <3=>3
1084 //     <i>  Selects DMA Stream (only Stream 2 or 3 can be used)
1085 //     <o3> Channel <7=>7
1086 //     <i>  Selects DMA Channel (only Channel 7 can be used)
1087 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1088 //     <i>  Selects DMA Priority
1089 //   </e>
1090 #define RTE_I2C2_RX_DMA                 0
1091 #define RTE_I2C2_RX_DMA_NUMBER          1
1092 #define RTE_I2C2_RX_DMA_STREAM          2
1093 #define RTE_I2C2_RX_DMA_CHANNEL         7
1094 #define RTE_I2C2_RX_DMA_PRIORITY        0
1095
1096 //   <e> DMA Tx
1097 //     <o1> Number <1=>1
1098 //     <i>  Selects DMA Number (only DMA1 can be used)
1099 //     <o2> Stream <7=>7
1100 //     <i>  Selects DMA Stream (only Stream 7 can be used)
1101 //     <o3> Channel <7=>7
1102 //     <i>  Selects DMA Channel (only Channel 1 can be used)
1103 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1104 //     <i>  Selects DMA Priority
1105 //   </e>
1106 #define RTE_I2C2_TX_DMA                 0
1107 #define RTE_I2C2_TX_DMA_NUMBER          1
1108 #define RTE_I2C2_TX_DMA_STREAM          7
1109 #define RTE_I2C2_TX_DMA_CHANNEL         7
1110 #define RTE_I2C2_TX_DMA_PRIORITY        0
1111
1112 // </e>
1113
1114
1115 // <e> I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3]
1116 // <i> Configuration settings for Driver_I2C3 in component ::CMSIS Driver:I2C
1117 #define RTE_I2C3                        0
1118
1119 //   <o> I2C3_SCL Pin <0=>PH7 <1=>PA8
1120 #define RTE_I2C3_SCL_PORT_ID            0
1121 #if    (RTE_I2C3_SCL_PORT_ID == 0)
1122 #define RTE_I2C3_SCL_PORT               GPIOH
1123 #define RTE_I2C3_SCL_BIT                7
1124 #elif  (RTE_I2C3_SCL_PORT_ID == 1)
1125 #define RTE_I2C3_SCL_PORT               GPIOA
1126 #define RTE_I2C3_SCL_BIT                8
1127 #else
1128 #error "Invalid I2C3_SCL Pin Configuration!"
1129 #endif
1130
1131 //   <o> I2C3_SDA Pin <0=>PH8 <1=>PC9 <2=>PB4 <3=>PB8
1132 #define RTE_I2C3_SDA_PORT_ID            0
1133 #if    (RTE_I2C3_SDA_PORT_ID == 0)
1134 #define RTE_I2C3_SDA_PORT               GPIOH
1135 #define RTE_I2C3_SDA_BIT                8
1136 #elif  (RTE_I2C3_SDA_PORT_ID == 1)
1137 #define RTE_I2C3_SDA_PORT               GPIOC
1138 #define RTE_I2C3_SDA_BIT                9
1139 #elif  (RTE_I2C3_SDA_PORT_ID == 2)
1140 #define RTE_I2C3_SDA_PORT               GPIOB
1141 #define RTE_I2C3_SDA_BIT                4
1142 #elif  (RTE_I2C3_SDA_PORT_ID == 3)
1143 #define RTE_I2C3_SDA_PORT               GPIOB
1144 #define RTE_I2C3_SDA_BIT                8
1145 #else
1146 #error "Invalid I2C3_SDA Pin Configuration!"
1147 #endif
1148
1149 //   <e> DMA Rx
1150 //     <o1> Number <1=>1
1151 //     <i>  Selects DMA Number (only DMA1 can be used)
1152 //     <o2> Stream <1=>1 <2=>2
1153 //     <i>  Selects DMA Stream (only Stream 1 or 2 can be used)
1154 //     <o3> Channel <1=>1 <3=>3
1155 //     <i>  Selects DMA Channel (only Channel 1 or 3 can be used)
1156 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1157 //     <i>  Selects DMA Priority
1158 //   </e>
1159 #define RTE_I2C3_RX_DMA                 0
1160 #define RTE_I2C3_RX_DMA_NUMBER          1
1161 #define RTE_I2C3_RX_DMA_STREAM          2
1162 #define RTE_I2C3_RX_DMA_CHANNEL         3
1163 #define RTE_I2C3_RX_DMA_PRIORITY        0
1164
1165 //   <e> DMA Tx
1166 //     <o1> Number <1=>1
1167 //     <i>  Selects DMA Number (only DMA1 can be used)
1168 //     <o2> Stream <4=>4
1169 //     <i>  Selects DMA Stream (only Stream 4 can be used)
1170 //     <o3> Channel <3=>3
1171 //     <i>  Selects DMA Channel (only Channel 3 can be used)
1172 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1173 //     <i>  Selects DMA Priority
1174 //   </e>
1175 #define RTE_I2C3_TX_DMA                 0
1176 #define RTE_I2C3_TX_DMA_NUMBER          1
1177 #define RTE_I2C3_TX_DMA_STREAM          4
1178 #define RTE_I2C3_TX_DMA_CHANNEL         3
1179 #define RTE_I2C3_TX_DMA_PRIORITY        0
1180
1181 // </e>
1182
1183
1184 // <e> I2C4 (Inter-integrated Circuit Interface 4) [Driver_I2C4]
1185 // <i> Configuration settings for Driver_I2C4 in component ::CMSIS Driver:I2C
1186 #define RTE_I2C4                        0
1187
1188 //   <o> I2C4_SCL Pin <0=>PD12 <1=>PF14 <2=>PH11 <3=>PB6 <4=>PB8
1189 #define RTE_I2C4_SCL_PORT_ID            0
1190 #if    (RTE_I2C4_SCL_PORT_ID == 0)
1191 #define RTE_I2C4_SCL_PORT               GPIOD
1192 #define RTE_I2C4_SCL_BIT                12
1193 #elif  (RTE_I2C4_SCL_PORT_ID == 1)
1194 #define RTE_I2C4_SCL_PORT               GPIOF
1195 #define RTE_I2C4_SCL_BIT                14
1196 #elif  (RTE_I2C4_SCL_PORT_ID == 2)
1197 #define RTE_I2C4_SCL_PORT               GPIOH
1198 #define RTE_I2C4_SCL_BIT                11
1199 #elif  (RTE_I2C4_SCL_PORT_ID == 3)
1200 #define RTE_I2C4_SCL_PORT               GPIOB
1201 #define RTE_I2C4_SCL_BIT                6
1202 #elif  (RTE_I2C4_SCL_PORT_ID == 4)
1203 #define RTE_I2C4_SCL_PORT               GPIOB
1204 #define RTE_I2C4_SCL_BIT                8
1205 #else
1206 #error "Invalid I2C4_SCL Pin Configuration!"
1207 #endif
1208
1209 //   <o> I2C4_SDA Pin <0=>PD13 <1=>PF15 <2=>PH12 <3=>PB7 <4=>PB9
1210 #define RTE_I2C4_SDA_PORT_ID            0
1211 #if    (RTE_I2C4_SDA_PORT_ID == 0)
1212 #define RTE_I2C4_SDA_PORT               GPIOD
1213 #define RTE_I2C4_SDA_BIT                13
1214 #elif  (RTE_I2C4_SDA_PORT_ID == 1)
1215 #define RTE_I2C4_SDA_PORT               GPIOF
1216 #define RTE_I2C4_SDA_BIT                15
1217 #elif  (RTE_I2C4_SDA_PORT_ID == 2)
1218 #define RTE_I2C4_SDA_PORT               GPIOH
1219 #define RTE_I2C4_SDA_BIT                12
1220 #elif  (RTE_I2C4_SDA_PORT_ID == 3)
1221 #define RTE_I2C4_SDA_PORT               GPIOB
1222 #define RTE_I2C4_SDA_BIT                7
1223 #elif  (RTE_I2C4_SDA_PORT_ID == 4)
1224 #define RTE_I2C4_SDA_PORT               GPIOB
1225 #define RTE_I2C4_SDA_BIT                9
1226 #else
1227 #error "Invalid I2C4_SDA Pin Configuration!"
1228 #endif
1229
1230 //   <e> DMA Rx
1231 //     <o1> Number <1=>1
1232 //     <i>  Selects DMA Number (only DMA1 can be used)
1233 //     <o2> Stream <2=>2
1234 //     <i>  Selects DMA Stream (only Stream 2 can be used)
1235 //     <o3> Channel <2=>2
1236 //     <i>  Selects DMA Channel (only Channel 2 can be used)
1237 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1238 //     <i>  Selects DMA Priority
1239 //   </e>
1240 #define RTE_I2C4_RX_DMA                 0
1241 #define RTE_I2C4_RX_DMA_NUMBER          1
1242 #define RTE_I2C4_RX_DMA_STREAM          2
1243 #define RTE_I2C4_RX_DMA_CHANNEL         3
1244 #define RTE_I2C4_RX_DMA_PRIORITY        0
1245
1246 //   <e> DMA Tx
1247 //     <o1> Number <1=>1
1248 //     <i>  Selects DMA Number (only DMA1 can be used)
1249 //     <o2> Stream <5=>5
1250 //     <i>  Selects DMA Stream (only Stream 5 can be used)
1251 //     <o3> Channel <2=>2
1252 //     <i>  Selects DMA Channel (only Channel 2 can be used)
1253 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1254 //     <i>  Selects DMA Priority
1255 //   </e>
1256 #define RTE_I2C4_TX_DMA                 0
1257 #define RTE_I2C4_TX_DMA_NUMBER          1
1258 #define RTE_I2C4_TX_DMA_STREAM          4
1259 #define RTE_I2C4_TX_DMA_CHANNEL         3
1260 #define RTE_I2C4_TX_DMA_PRIORITY        0
1261
1262 // </e>
1263
1264
1265 // <e> SPI1 (Serial Peripheral Interface 1) [Driver_SPI1]
1266 // <i> Configuration settings for Driver_SPI1 in component ::CMSIS Driver:SPI
1267 #define RTE_SPI1                        0
1268
1269 //   <o> SPI1_MISO Pin <0=>Not Used <1=>PA6 <2=>PB4 <3=>PG9
1270 #define RTE_SPI1_MISO_PORT_ID           0
1271 #if    (RTE_SPI1_MISO_PORT_ID == 0)
1272 #define RTE_SPI1_MISO                   0
1273 #elif  (RTE_SPI1_MISO_PORT_ID == 1)
1274 #define RTE_SPI1_MISO                   1
1275 #define RTE_SPI1_MISO_PORT              GPIOA
1276 #define RTE_SPI1_MISO_BIT               6
1277 #elif  (RTE_SPI1_MISO_PORT_ID == 2)
1278 #define RTE_SPI1_MISO                   1
1279 #define RTE_SPI1_MISO_PORT              GPIOB
1280 #define RTE_SPI1_MISO_BIT               4
1281 #elif  (RTE_SPI1_MISO_PORT_ID == 3)
1282 #define RTE_SPI1_MISO                   1
1283 #define RTE_SPI1_MISO_PORT              GPIOG
1284 #define RTE_SPI1_MISO_BIT               9
1285 #else
1286 #error "Invalid SPI1_MISO Pin Configuration!"
1287 #endif
1288
1289 //   <o> SPI1_MOSI Pin <0=>Not Used <1=>PA7 <2=>PB5 <3=>PD7
1290 #define RTE_SPI1_MOSI_PORT_ID           0
1291 #if    (RTE_SPI1_MOSI_PORT_ID == 0)
1292 #define RTE_SPI1_MOSI                   0
1293 #elif  (RTE_SPI1_MOSI_PORT_ID == 1)
1294 #define RTE_SPI1_MOSI                   1
1295 #define RTE_SPI1_MOSI_PORT              GPIOA
1296 #define RTE_SPI1_MOSI_BIT               7
1297 #elif  (RTE_SPI1_MOSI_PORT_ID == 2)
1298 #define RTE_SPI1_MOSI                   1
1299 #define RTE_SPI1_MOSI_PORT              GPIOB
1300 #define RTE_SPI1_MOSI_BIT               5
1301 #elif  (RTE_SPI1_MOSI_PORT_ID == 3)
1302 #define RTE_SPI1_MOSI                   1
1303 #define RTE_SPI1_MOSI_PORT              GPIOD
1304 #define RTE_SPI1_MOSI_BIT               7
1305 #else
1306 #error "Invalid SPI1_MOSI Pin Configuration!"
1307 #endif
1308
1309 //   <o> SPI1_SCK Pin <0=>PA5 <1=>PB3 <2=>PG11
1310 #define RTE_SPI1_SCL_PORT_ID            0
1311 #if    (RTE_SPI1_SCL_PORT_ID == 0)
1312 #define RTE_SPI1_SCL_PORT               GPIOA
1313 #define RTE_SPI1_SCL_BIT                5
1314 #elif  (RTE_SPI1_SCL_PORT_ID == 1)
1315 #define RTE_SPI1_SCL_PORT               GPIOB
1316 #define RTE_SPI1_SCL_BIT                3
1317 #elif  (RTE_SPI1_SCL_PORT_ID == 2)
1318 #define RTE_SPI1_SCL_PORT               GPIOG
1319 #define RTE_SPI1_SCL_BIT                11
1320 #else
1321 #error "Invalid SPI1_SCK Pin Configuration!"
1322 #endif
1323
1324 //   <o> SPI1_NSS Pin <0=>Not Used <1=>PA4 <2=>PA15 <3=>PG10
1325 #define RTE_SPI1_NSS_PORT_ID            0
1326 #if    (RTE_SPI1_NSS_PORT_ID == 0)
1327 #define RTE_SPI1_NSS_PIN                0
1328 #elif  (RTE_SPI1_NSS_PORT_ID == 1)
1329 #define RTE_SPI1_NSS_PIN                1
1330 #define RTE_SPI1_NSS_PORT               GPIOA
1331 #define RTE_SPI1_NSS_BIT                4
1332 #elif  (RTE_SPI1_NSS_PORT_ID == 2)
1333 #define RTE_SPI1_NSS_PIN                1
1334 #define RTE_SPI1_NSS_PORT               GPIOA
1335 #define RTE_SPI1_NSS_BIT                15
1336 #elif  (RTE_SPI1_NSS_PORT_ID == 3)
1337 #define RTE_SPI1_NSS_PIN                1
1338 #define RTE_SPI1_NSS_PORT               GPIOG
1339 #define RTE_SPI1_NSS_BIT                10
1340 #else
1341 #error "Invalid SPI1_NSS Pin Configuration!"
1342 #endif
1343
1344 //   <e> DMA Rx
1345 //     <o1> Number <2=>2
1346 //     <i>  Selects DMA Number (only DMA2 can be used)
1347 //     <o2> Stream <0=>0 <2=>2
1348 //     <i>  Selects DMA Stream (only Stream 0 or 2 can be used)
1349 //     <o3> Channel <3=>3
1350 //     <i>  Selects DMA Channel (only Channel 3 can be used)
1351 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1352 //     <i>  Selects DMA Priority
1353 //   </e>
1354 #define RTE_SPI1_RX_DMA                 0
1355 #define RTE_SPI1_RX_DMA_NUMBER          2
1356 #define RTE_SPI1_RX_DMA_STREAM          0
1357 #define RTE_SPI1_RX_DMA_CHANNEL         3
1358 #define RTE_SPI1_RX_DMA_PRIORITY        0
1359
1360 //   <e> DMA Tx
1361 //     <o1> Number <2=>2
1362 //     <i>  Selects DMA Number (only DMA2 can be used)
1363 //     <o2> Stream <3=>3 <5=>5
1364 //     <i>  Selects DMA Stream (only Stream 3 or 5 can be used)
1365 //     <o3> Channel <3=>3
1366 //     <i>  Selects DMA Channel (only Channel 3 can be used)
1367 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1368 //     <i>  Selects DMA Priority
1369 //   </e>
1370 #define RTE_SPI1_TX_DMA                 0
1371 #define RTE_SPI1_TX_DMA_NUMBER          2
1372 #define RTE_SPI1_TX_DMA_STREAM          5
1373 #define RTE_SPI1_TX_DMA_CHANNEL         3
1374 #define RTE_SPI1_TX_DMA_PRIORITY        0
1375
1376 // </e>
1377
1378
1379 // <e> SPI2 (Serial Peripheral Interface 2) [Driver_SPI2]
1380 // <i> Configuration settings for Driver_SPI2 in component ::CMSIS Driver:SPI
1381 #define RTE_SPI2                        1
1382
1383 //   <o> SPI2_MISO Pin <0=>Not Used <1=>PB14 <2=>PC2 <3=>PI2
1384 #define RTE_SPI2_MISO_PORT_ID           1
1385 #if    (RTE_SPI2_MISO_PORT_ID == 0)
1386 #define RTE_SPI2_MISO                   0
1387 #elif  (RTE_SPI2_MISO_PORT_ID == 1)
1388 #define RTE_SPI2_MISO                   1
1389 #define RTE_SPI2_MISO_PORT              GPIOB
1390 #define RTE_SPI2_MISO_BIT               14
1391 #elif  (RTE_SPI2_MISO_PORT_ID == 2)
1392 #define RTE_SPI2_MISO                   1
1393 #define RTE_SPI2_MISO_PORT              GPIOC
1394 #define RTE_SPI2_MISO_BIT               2
1395 #elif  (RTE_SPI2_MISO_PORT_ID == 3)
1396 #define RTE_SPI2_MISO                   1
1397 #define RTE_SPI2_MISO_PORT              GPIOI
1398 #define RTE_SPI2_MISO_BIT               2
1399 #else
1400 #error "Invalid SPI2_MISO Pin Configuration!"
1401 #endif
1402
1403 //   <o> SPI2_MOSI Pin <0=>Not Used <1=>PB15 <2=>PC1 <3=>PC3 <4=>PI3 <5=>PB15
1404 #define RTE_SPI2_MOSI_PORT_ID           1
1405 #if    (RTE_SPI2_MOSI_PORT_ID == 0)
1406 #define RTE_SPI2_MOSI                   0
1407 #elif  (RTE_SPI2_MOSI_PORT_ID == 1)
1408 #define RTE_SPI2_MOSI                   1
1409 #define RTE_SPI2_MOSI_PORT              GPIOB
1410 #define RTE_SPI2_MOSI_BIT               15
1411 #elif  (RTE_SPI2_MOSI_PORT_ID == 2)
1412 #define RTE_SPI2_MOSI                   1
1413 #define RTE_SPI2_MOSI_PORT              GPIOC
1414 #define RTE_SPI2_MOSI_BIT               1
1415 #elif  (RTE_SPI2_MOSI_PORT_ID == 3)
1416 #define RTE_SPI2_MOSI                   1
1417 #define RTE_SPI2_MOSI_PORT              GPIOC
1418 #define RTE_SPI2_MOSI_BIT               3
1419 #elif  (RTE_SPI2_MOSI_PORT_ID == 4)
1420 #define RTE_SPI2_MOSI                   1
1421 #define RTE_SPI2_MOSI_PORT              GPIOI
1422 #define RTE_SPI2_MOSI_BIT               3
1423 #elif  (RTE_SPI2_MOSI_PORT_ID == 5)
1424 #define RTE_SPI2_MOSI                   1
1425 #define RTE_SPI2_MOSI_PORT              GPIOB
1426 #define RTE_SPI2_MOSI_BIT               15
1427 #else
1428 #error "Invalid SPI2_MOSI Pin Configuration!"
1429 #endif
1430
1431 //   <o> SPI2_SCK Pin <0=>PA9 <1=>PB10 <2=>PB13 <3=>PD3 <4=>PI1 <5=>PA12
1432 #define RTE_SPI2_SCL_PORT_ID            4
1433 #if    (RTE_SPI2_SCL_PORT_ID == 0)
1434 #define RTE_SPI2_SCL_PORT               GPIOA
1435 #define RTE_SPI2_SCL_BIT                9
1436 #elif  (RTE_SPI2_SCL_PORT_ID == 1)
1437 #define RTE_SPI2_SCL_PORT               GPIOB
1438 #define RTE_SPI2_SCL_BIT                10
1439 #elif  (RTE_SPI2_SCL_PORT_ID == 2)
1440 #define RTE_SPI2_SCL_PORT               GPIOB
1441 #define RTE_SPI2_SCL_BIT                13
1442 #elif  (RTE_SPI2_SCL_PORT_ID == 3)
1443 #define RTE_SPI2_SCL_PORT               GPIOD
1444 #define RTE_SPI2_SCL_BIT                3
1445 #elif  (RTE_SPI2_SCL_PORT_ID == 4)
1446 #define RTE_SPI2_SCL_PORT               GPIOI
1447 #define RTE_SPI2_SCL_BIT                1
1448 #elif  (RTE_SPI2_SCL_PORT_ID == 5)
1449 #define RTE_SPI2_SCL_PORT               GPIOA
1450 #define RTE_SPI2_SCL_BIT                12
1451 #else
1452 #error "Invalid SPI2_SCK Pin Configuration!"
1453 #endif
1454
1455 //   <o> SPI2_NSS Pin <0=>Not Used <1=>PB4 <2=>PB9 <3=>PB12 <4=>PI0 <5=>PA11
1456 #define RTE_SPI2_NSS_PORT_ID            0
1457 #if    (RTE_SPI2_NSS_PORT_ID == 0)
1458 #define RTE_SPI2_NSS_PIN                0
1459 #elif  (RTE_SPI2_NSS_PORT_ID == 1)
1460 #define RTE_SPI2_NSS_PIN                1
1461 #define RTE_SPI2_NSS_PORT               GPIOB
1462 #define RTE_SPI2_NSS_BIT                4
1463 #elif  (RTE_SPI2_NSS_PORT_ID == 2)
1464 #define RTE_SPI2_NSS_PIN                1
1465 #define RTE_SPI2_NSS_PORT               GPIOB
1466 #define RTE_SPI2_NSS_BIT                9
1467 #elif  (RTE_SPI2_NSS_PORT_ID == 3)
1468 #define RTE_SPI2_NSS_PIN                1
1469 #define RTE_SPI2_NSS_PORT               GPIOB
1470 #define RTE_SPI2_NSS_BIT                12
1471 #elif  (RTE_SPI2_NSS_PORT_ID == 4)
1472 #define RTE_SPI2_NSS_PIN                1
1473 #define RTE_SPI2_NSS_PORT               GPIOI
1474 #define RTE_SPI2_NSS_BIT                0
1475 #elif  (RTE_SPI2_NSS_PORT_ID == 5)
1476 #define RTE_SPI2_NSS_PIN                1
1477 #define RTE_SPI2_NSS_PORT               GPIOA
1478 #define RTE_SPI2_NSS_BIT                11
1479 #else
1480 #error "Invalid SPI2_NSS Pin Configuration!"
1481 #endif
1482
1483 //   <e> DMA Rx
1484 //     <o1> Number <1=>1
1485 //     <i>  Selects DMA Number (only DMA1 can be used)
1486 //     <o2> Stream <3=>3
1487 //     <i>  Selects DMA Stream (only Stream 3 can be used)
1488 //     <o3> Channel <0=>0
1489 //     <i>  Selects DMA Channel (only Channel 0 can be used)
1490 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1491 //     <i>  Selects DMA Priority
1492 //   </e>
1493 #define RTE_SPI2_RX_DMA                 1
1494 #define RTE_SPI2_RX_DMA_NUMBER          1
1495 #define RTE_SPI2_RX_DMA_STREAM          3
1496 #define RTE_SPI2_RX_DMA_CHANNEL         0
1497 #define RTE_SPI2_RX_DMA_PRIORITY        0
1498
1499 //   <e> DMA Tx
1500 //     <o1> Number <1=>1
1501 //     <i>  Selects DMA Number (only DMA1 can be used)
1502 //     <o2> Stream <4=>4
1503 //     <i>  Selects DMA Stream (only Stream 4 can be used)
1504 //     <o3> Channel <0=>0
1505 //     <i>  Selects DMA Channel (only Channel 0 can be used)
1506 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1507 //     <i>  Selects DMA Priority
1508 //   </e>
1509 #define RTE_SPI2_TX_DMA                 1
1510 #define RTE_SPI2_TX_DMA_NUMBER          1
1511 #define RTE_SPI2_TX_DMA_STREAM          4
1512 #define RTE_SPI2_TX_DMA_CHANNEL         0
1513 #define RTE_SPI2_TX_DMA_PRIORITY        0
1514
1515 // </e>
1516
1517
1518 // <e> SPI3 (Serial Peripheral Interface 3) [Driver_SPI3]
1519 // <i> Configuration settings for Driver_SPI3 in component ::CMSIS Driver:SPI
1520 #define RTE_SPI3                        0
1521
1522 //   <o> SPI3_MISO Pin <0=>Not Used <1=>PB4 <2=>PC11
1523 #define RTE_SPI3_MISO_PORT_ID           0
1524 #if    (RTE_SPI3_MISO_PORT_ID == 0)
1525 #define RTE_SPI3_MISO                   0
1526 #elif  (RTE_SPI3_MISO_PORT_ID == 1)
1527 #define RTE_SPI3_MISO                   1
1528 #define RTE_SPI3_MISO_PORT              GPIOB
1529 #define RTE_SPI3_MISO_BIT               4
1530 #elif  (RTE_SPI3_MISO_PORT_ID == 2)
1531 #define RTE_SPI3_MISO                   1
1532 #define RTE_SPI3_MISO_PORT              GPIOC
1533 #define RTE_SPI3_MISO_BIT               11
1534 #else
1535 #error "Invalid SPI3_MISO Pin Configuration!"
1536 #endif
1537
1538 //   <o> SPI3_MOSI Pin <0=>Not Used <1=>PB2 <2=>PB5 <3=>PC12 <4=>PD6
1539 #define RTE_SPI3_MOSI_PORT_ID           0
1540 #if    (RTE_SPI3_MOSI_PORT_ID == 0)
1541 #define RTE_SPI3_MOSI                   0
1542 #elif  (RTE_SPI3_MOSI_PORT_ID == 1)
1543 #define RTE_SPI3_MOSI                   1
1544 #define RTE_SPI3_MOSI_PORT              GPIOB
1545 #define RTE_SPI3_MOSI_BIT               2
1546 #elif  (RTE_SPI3_MOSI_PORT_ID == 2)
1547 #define RTE_SPI3_MOSI                   1
1548 #define RTE_SPI3_MOSI_PORT              GPIOB
1549 #define RTE_SPI3_MOSI_BIT               5
1550 #elif  (RTE_SPI3_MOSI_PORT_ID == 3)
1551 #define RTE_SPI3_MOSI                   1
1552 #define RTE_SPI3_MOSI_PORT              GPIOC
1553 #define RTE_SPI3_MOSI_BIT               12
1554 #elif  (RTE_SPI3_MOSI_PORT_ID == 4)
1555 #define RTE_SPI3_MOSI                   1
1556 #define RTE_SPI3_MOSI_PORT              GPIOD
1557 #define RTE_SPI3_MOSI_BIT               6
1558 #else
1559 #error "Invalid SPI3_MOSI Pin Configuration!"
1560 #endif
1561
1562 //   <o> SPI3_SCK Pin <0=>PB3 <1=>PC10
1563 #define RTE_SPI3_SCL_PORT_ID            0
1564 #if    (RTE_SPI3_SCL_PORT_ID == 0)
1565 #define RTE_SPI3_SCL_PORT               GPIOB
1566 #define RTE_SPI3_SCL_BIT                3
1567 #elif  (RTE_SPI3_SCL_PORT_ID == 1)
1568 #define RTE_SPI3_SCL_PORT               GPIOC
1569 #define RTE_SPI3_SCL_BIT                10
1570 #else
1571 #error "Invalid SPI3_SCK Pin Configuration!"
1572 #endif
1573
1574 //   <o> SPI3_NSS Pin <0=>Not Used <1=>PA4 <2=>PA15
1575 #define RTE_SPI3_NSS_PORT_ID            0
1576 #if    (RTE_SPI3_NSS_PORT_ID == 0)
1577 #define RTE_SPI3_NSS_PIN                0
1578 #elif  (RTE_SPI3_NSS_PORT_ID == 1)
1579 #define RTE_SPI3_NSS_PIN                1
1580 #define RTE_SPI3_NSS_PORT               GPIOA
1581 #define RTE_SPI3_NSS_BIT                4
1582 #elif  (RTE_SPI3_NSS_PORT_ID == 2)
1583 #define RTE_SPI3_NSS_PIN                1
1584 #define RTE_SPI3_NSS_PORT               GPIOA
1585 #define RTE_SPI3_NSS_BIT                15
1586 #else
1587 #error "Invalid SPI3_NSS Pin Configuration!"
1588 #endif
1589
1590 //   <e> DMA Rx
1591 //     <o1> Number <1=>1
1592 //     <i>  Selects DMA Number (only DMA1 can be used)
1593 //     <o2> Stream <0=>0 <2=>2
1594 //     <i>  Selects DMA Stream (only Stream 0 or 2 can be used)
1595 //     <o3> Channel <0=>0
1596 //     <i>  Selects DMA Channel (only Channel 0 can be used)
1597 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1598 //     <i>  Selects DMA Priority
1599 //   </e>
1600 #define RTE_SPI3_RX_DMA                 0
1601 #define RTE_SPI3_RX_DMA_NUMBER          1
1602 #define RTE_SPI3_RX_DMA_STREAM          0
1603 #define RTE_SPI3_RX_DMA_CHANNEL         0
1604 #define RTE_SPI3_RX_DMA_PRIORITY        0
1605
1606 //   <e> DMA Tx
1607 //     <o1> Number <1=>1
1608 //     <i>  Selects DMA Number (only DMA1 can be used)
1609 //     <o2> Stream <5=>5 <7=>7
1610 //     <i>  Selects DMA Stream (only Stream 5 or 7 can be used)
1611 //     <o3> Channel <0=>0
1612 //     <i>  Selects DMA Channel (only Channel 0 can be used)
1613 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1614 //     <i>  Selects DMA Priority
1615 //   </e>
1616 #define RTE_SPI3_TX_DMA                 0
1617 #define RTE_SPI3_TX_DMA_NUMBER          1
1618 #define RTE_SPI3_TX_DMA_STREAM          5
1619 #define RTE_SPI3_TX_DMA_CHANNEL         0
1620 #define RTE_SPI3_TX_DMA_PRIORITY        0
1621
1622 // </e>
1623
1624
1625 // <e> SPI4 (Serial Peripheral Interface 4) [Driver_SPI4]
1626 // <i> Configuration settings for Driver_SPI4 in component ::CMSIS Driver:SPI
1627 #define RTE_SPI4                        0
1628
1629 //   <o> SPI4_MISO Pin <0=>Not Used <1=>PE5 <2=>PE13
1630 #define RTE_SPI4_MISO_PORT_ID           0
1631 #if    (RTE_SPI4_MISO_PORT_ID == 0)
1632 #define RTE_SPI4_MISO                   0
1633 #elif  (RTE_SPI4_MISO_PORT_ID == 1)
1634 #define RTE_SPI4_MISO                   1
1635 #define RTE_SPI4_MISO_PORT              GPIOE
1636 #define RTE_SPI4_MISO_BIT               5
1637 #elif  (RTE_SPI4_MISO_PORT_ID == 2)
1638 #define RTE_SPI4_MISO                   1
1639 #define RTE_SPI4_MISO_PORT              GPIOE
1640 #define RTE_SPI4_MISO_BIT               13
1641 #else
1642 #error "Invalid SPI4_MISO Pin Configuration!"
1643 #endif
1644
1645 //   <o> SPI4_MOSI Pin <0=>Not Used <1=>PE6 <2=>PE14
1646 #define RTE_SPI4_MOSI_PORT_ID           0
1647 #if    (RTE_SPI4_MOSI_PORT_ID == 0)
1648 #define RTE_SPI4_MOSI                   0
1649 #elif  (RTE_SPI4_MOSI_PORT_ID == 1)
1650 #define RTE_SPI4_MOSI                   1
1651 #define RTE_SPI4_MOSI_PORT              GPIOE
1652 #define RTE_SPI4_MOSI_BIT               6
1653 #elif  (RTE_SPI4_MOSI_PORT_ID == 2)
1654 #define RTE_SPI4_MOSI                   1
1655 #define RTE_SPI4_MOSI_PORT              GPIOE
1656 #define RTE_SPI4_MOSI_BIT               14
1657 #else
1658 #error "Invalid SPI4_MOSI Pin Configuration!"
1659 #endif
1660
1661 //   <o> SPI4_SCK Pin <0=>PE2 <1=>PE12
1662 #define RTE_SPI4_SCL_PORT_ID            0
1663 #if    (RTE_SPI4_SCL_PORT_ID == 0)
1664 #define RTE_SPI4_SCL_PORT               GPIOE
1665 #define RTE_SPI4_SCL_BIT                2
1666 #elif  (RTE_SPI4_SCL_PORT_ID == 1)
1667 #define RTE_SPI4_SCL_PORT               GPIOE
1668 #define RTE_SPI4_SCL_BIT                12
1669 #else
1670 #error "Invalid SPI4_SCK Pin Configuration!"
1671 #endif
1672
1673 //   <o> SPI4_NSS Pin <0=>Not Used <1=>PE4 <2=>PE11
1674 #define RTE_SPI4_NSS_PORT_ID            0
1675 #if    (RTE_SPI4_NSS_PORT_ID == 0)
1676 #define RTE_SPI4_NSS_PIN                0
1677 #elif  (RTE_SPI4_NSS_PORT_ID == 1)
1678 #define RTE_SPI4_NSS_PIN                1
1679 #define RTE_SPI4_NSS_PORT               GPIOE
1680 #define RTE_SPI4_NSS_BIT                4
1681 #elif  (RTE_SPI4_NSS_PORT_ID == 2)
1682 #define RTE_SPI4_NSS_PIN                1
1683 #define RTE_SPI4_NSS_PORT               GPIOE
1684 #define RTE_SPI4_NSS_BIT                11
1685 #else
1686 #error "Invalid SPI4_NSS Pin Configuration!"
1687 #endif
1688
1689 //   <e> DMA Rx
1690 //     <o1> Number <2=>2
1691 //     <i>  Selects DMA Number (only DMA2 can be used)
1692 //     <o2> Stream <0=>0 <3=>3
1693 //     <i>  Selects DMA Stream (only Stream 0 or 3 can be used)
1694 //     <o3> Channel <4=>4 <5=>5
1695 //     <i>  Selects DMA Channel (only Channel 4 or 5 can be used)
1696 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1697 //     <i>  Selects DMA Priority
1698 //   </e>
1699 #define RTE_SPI4_RX_DMA                 0
1700 #define RTE_SPI4_RX_DMA_NUMBER          2
1701 #define RTE_SPI4_RX_DMA_STREAM          0
1702 #define RTE_SPI4_RX_DMA_CHANNEL         4
1703 #define RTE_SPI4_RX_DMA_PRIORITY        0
1704
1705 //   <e> DMA Tx
1706 //     <o1> Number <2=>2
1707 //     <i>  Selects DMA Number (only DMA2 can be used)
1708 //     <o2> Stream <1=>1 <4=>4
1709 //     <i>  Selects DMA Stream (only Stream 1 or 4 can be used)
1710 //     <o3> Channel <4=>4 <5=>5
1711 //     <i>  Selects DMA Channel (only Channel 4 or 5 can be used)
1712 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1713 //     <i>  Selects DMA Priority
1714 //   </e>
1715 #define RTE_SPI4_TX_DMA                 0
1716 #define RTE_SPI4_TX_DMA_NUMBER          2
1717 #define RTE_SPI4_TX_DMA_STREAM          1
1718 #define RTE_SPI4_TX_DMA_CHANNEL         4
1719 #define RTE_SPI4_TX_DMA_PRIORITY        0
1720
1721 // </e>
1722
1723
1724 // <e> SPI5 (Serial Peripheral Interface 5) [Driver_SPI5]
1725 // <i> Configuration settings for Driver_SPI5 in component ::CMSIS Driver:SPI
1726 #define RTE_SPI5                        0
1727
1728 //   <o> SPI5_MISO Pin <0=>Not Used <1=>PF8 <2=>PH7
1729 #define RTE_SPI5_MISO_PORT_ID           0
1730 #if    (RTE_SPI5_MISO_PORT_ID == 0)
1731 #define RTE_SPI5_MISO                   0
1732 #elif  (RTE_SPI5_MISO_PORT_ID == 1)
1733 #define RTE_SPI5_MISO                   1
1734 #define RTE_SPI5_MISO_PORT              GPIOF
1735 #define RTE_SPI5_MISO_BIT               8
1736 #elif  (RTE_SPI5_MISO_PORT_ID == 2)
1737 #define RTE_SPI5_MISO                   1
1738 #define RTE_SPI5_MISO_PORT              GPIOH
1739 #define RTE_SPI5_MISO_BIT               7
1740 #else
1741 #error "Invalid SPI5_MISO Pin Configuration!"
1742 #endif
1743
1744 //   <o> SPI5_MOSI Pin <0=>Not Used <1=>PF9 <2=>PF11
1745 #define RTE_SPI5_MOSI_PORT_ID           0
1746 #if    (RTE_SPI5_MOSI_PORT_ID == 0)
1747 #define RTE_SPI5_MOSI                   0
1748 #elif  (RTE_SPI5_MOSI_PORT_ID == 1)
1749 #define RTE_SPI5_MOSI                   1
1750 #define RTE_SPI5_MOSI_PORT              GPIOF
1751 #define RTE_SPI5_MOSI_BIT               9
1752 #elif  (RTE_SPI5_MOSI_PORT_ID == 2)
1753 #define RTE_SPI5_MOSI                   1
1754 #define RTE_SPI5_MOSI_PORT              GPIOF
1755 #define RTE_SPI5_MOSI_BIT               11
1756 #else
1757 #error "Invalid SPI5_MOSI Pin Configuration!"
1758 #endif
1759
1760 //   <o> SPI5_SCK Pin <0=>PF7 <1=>PH6
1761 #define RTE_SPI5_SCL_PORT_ID            0
1762 #if    (RTE_SPI5_SCL_PORT_ID == 0)
1763 #define RTE_SPI5_SCL_PORT               GPIOF
1764 #define RTE_SPI5_SCL_BIT                7
1765 #elif  (RTE_SPI5_SCL_PORT_ID == 1)
1766 #define RTE_SPI5_SCL_PORT               GPIOH
1767 #define RTE_SPI5_SCL_BIT                6
1768 #else
1769 #error "Invalid SPI5_SCK Pin Configuration!"
1770 #endif
1771
1772 //   <o> SPI5_NSS Pin <0=>Not Used <1=>PF6 <2=>PH5
1773 #define RTE_SPI5_NSS_PORT_ID            0
1774 #if    (RTE_SPI5_NSS_PORT_ID == 0)
1775 #define RTE_SPI5_NSS_PIN                0
1776 #elif  (RTE_SPI5_NSS_PORT_ID == 1)
1777 #define RTE_SPI5_NSS_PIN                1
1778 #define RTE_SPI5_NSS_PORT               GPIOF
1779 #define RTE_SPI5_NSS_BIT                6
1780 #elif  (RTE_SPI5_NSS_PORT_ID == 2)
1781 #define RTE_SPI5_NSS_PIN                1
1782 #define RTE_SPI5_NSS_PORT               GPIOH
1783 #define RTE_SPI5_NSS_BIT                5
1784 #else
1785 #error "Invalid SPI5_NSS Pin Configuration!"
1786 #endif
1787
1788 //   <e> DMA Rx
1789 //     <o1> Number <2=>2
1790 //     <i>  Selects DMA Number (only DMA2 can be used)
1791 //     <o2> Stream <3=>3 <5=>5
1792 //     <i>  Selects DMA Stream (only Stream 3 or 5 can be used)
1793 //     <o3> Channel <2=>2 <7=>7
1794 //     <i>  Selects DMA Channel (only Channel 2 or 7 can be used)
1795 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1796 //     <i>  Selects DMA Priority
1797 //   </e>
1798 #define RTE_SPI5_RX_DMA                 0
1799 #define RTE_SPI5_RX_DMA_NUMBER          2
1800 #define RTE_SPI5_RX_DMA_STREAM          3
1801 #define RTE_SPI5_RX_DMA_CHANNEL         2
1802 #define RTE_SPI5_RX_DMA_PRIORITY        0
1803
1804 //   <e> DMA Tx
1805 //     <o1> Number <2=>2
1806 //     <i>  Selects DMA Number (only DMA2 can be used)
1807 //     <o2> Stream <4=>4 <6=>6
1808 //     <i>  Selects DMA Stream (only Stream 4 or 6 can be used)
1809 //     <o3> Channel <2=>2 <7=>7
1810 //     <i>  Selects DMA Channel (only Channel 2 or 7 can be used)
1811 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1812 //     <i>  Selects DMA Priority
1813 //   </e>
1814 #define RTE_SPI5_TX_DMA                 0
1815 #define RTE_SPI5_TX_DMA_NUMBER          2
1816 #define RTE_SPI5_TX_DMA_STREAM          4
1817 #define RTE_SPI5_TX_DMA_CHANNEL         2
1818 #define RTE_SPI5_TX_DMA_PRIORITY        0
1819
1820 // </e>
1821
1822
1823 // <e> SPI6 (Serial Peripheral Interface 6) [Driver_SPI6]
1824 // <i> Configuration settings for Driver_SPI6 in component ::CMSIS Driver:SPI
1825 #define RTE_SPI6                        0
1826
1827 //   <o> SPI6_MISO Pin <0=>Not Used <1=>PG12 <2=>PA6 <3=>PB4
1828 #define RTE_SPI6_MISO_PORT_ID           0
1829 #if    (RTE_SPI6_MISO_PORT_ID == 0)
1830 #define RTE_SPI6_MISO                   0
1831 #elif  (RTE_SPI6_MISO_PORT_ID == 1)
1832 #define RTE_SPI6_MISO                   1
1833 #define RTE_SPI6_MISO_PORT              GPIOG
1834 #define RTE_SPI6_MISO_BIT               12
1835 #elif  (RTE_SPI6_MISO_PORT_ID == 2)
1836 #define RTE_SPI6_MISO                   1
1837 #define RTE_SPI6_MISO_PORT              GPIOA
1838 #define RTE_SPI6_MISO_BIT               6
1839 #elif  (RTE_SPI6_MISO_PORT_ID == 3)
1840 #define RTE_SPI6_MISO                   1
1841 #define RTE_SPI6_MISO_PORT              GPIOB
1842 #define RTE_SPI6_MISO_BIT               4
1843 #else
1844 #error "Invalid SPI6_MISO Pin Configuration!"
1845 #endif
1846
1847 //   <o> SPI6_MOSI Pin <0=>Not Used <1=>PG14 <2=>PA7 <3=>PB5
1848 #define RTE_SPI6_MOSI_PORT_ID           0
1849 #if    (RTE_SPI6_MOSI_PORT_ID == 0)
1850 #define RTE_SPI6_MOSI                   0
1851 #elif  (RTE_SPI6_MOSI_PORT_ID == 1)
1852 #define RTE_SPI6_MOSI                   1
1853 #define RTE_SPI6_MOSI_PORT              GPIOG
1854 #define RTE_SPI6_MOSI_BIT               14
1855 #elif  (RTE_SPI6_MOSI_PORT_ID == 2)
1856 #define RTE_SPI6_MOSI                   1
1857 #define RTE_SPI6_MOSI_PORT              GPIOA
1858 #define RTE_SPI6_MOSI_BIT               7
1859 #elif  (RTE_SPI6_MOSI_PORT_ID == 3)
1860 #define RTE_SPI6_MOSI                   1
1861 #define RTE_SPI6_MOSI_PORT              GPIOB
1862 #define RTE_SPI6_MOSI_BIT               5
1863 #else
1864 #error "Invalid SPI6_MOSI Pin Configuration!"
1865 #endif
1866
1867 //   <o> SPI6_SCK Pin <0=>PG13 <1=>PA5 <2=>PB3
1868 #define RTE_SPI6_SCL_PORT_ID            0
1869 #if    (RTE_SPI6_SCL_PORT_ID == 0)
1870 #define RTE_SPI6_SCL_PORT               GPIOG
1871 #define RTE_SPI6_SCL_BIT                13
1872 #elif  (RTE_SPI6_SCL_PORT_ID == 1)
1873 #define RTE_SPI6_SCL_PORT               GPIOA
1874 #define RTE_SPI6_SCL_BIT                5
1875 #elif  (RTE_SPI6_SCL_PORT_ID == 2)
1876 #define RTE_SPI6_SCL_PORT               GPIOB
1877 #define RTE_SPI6_SCL_BIT                3
1878 #else
1879 #error "Invalid SPI6_SCK Pin Configuration!"
1880 #endif
1881
1882 //   <o> SPI6_NSS Pin <0=>Not Used <1=>PG8 <2=>PA4 <3=>PA15
1883 #define RTE_SPI6_NSS_PORT_ID            0
1884 #if    (RTE_SPI6_NSS_PORT_ID == 0)
1885 #define RTE_SPI6_NSS_PIN                0
1886 #elif  (RTE_SPI6_NSS_PORT_ID == 1)
1887 #define RTE_SPI6_NSS_PIN                1
1888 #define RTE_SPI6_NSS_PORT               GPIOG
1889 #define RTE_SPI6_NSS_BIT                8
1890 #elif  (RTE_SPI6_NSS_PORT_ID == 2)
1891 #define RTE_SPI6_NSS_PIN                1
1892 #define RTE_SPI6_NSS_PORT               GPIOA
1893 #define RTE_SPI6_NSS_BIT                4
1894 #elif  (RTE_SPI6_NSS_PORT_ID == 3)
1895 #define RTE_SPI6_NSS_PIN                1
1896 #define RTE_SPI6_NSS_PORT               GPIOA
1897 #define RTE_SPI6_NSS_BIT                15
1898 #else
1899 #error "Invalid SPI6_NSS Pin Configuration!"
1900 #endif
1901
1902 //   <e> DMA Rx
1903 //     <o1> Number <2=>2
1904 //     <i>  Selects DMA Number (only DMA2 can be used)
1905 //     <o2> Stream <6=>6
1906 //     <i>  Selects DMA Stream (only Stream 6 can be used)
1907 //     <o3> Channel <1=>1
1908 //     <i>  Selects DMA Channel (only Channel 1 can be used)
1909 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1910 //     <i>  Selects DMA Priority
1911 //   </e>
1912 #define RTE_SPI6_RX_DMA                 0
1913 #define RTE_SPI6_RX_DMA_NUMBER          2
1914 #define RTE_SPI6_RX_DMA_STREAM          6
1915 #define RTE_SPI6_RX_DMA_CHANNEL         1
1916 #define RTE_SPI6_RX_DMA_PRIORITY        0
1917
1918 //   <e> DMA Tx
1919 //     <o1> Number <2=>2
1920 //     <i>  Selects DMA Number (only DMA2 can be used)
1921 //     <o2> Stream <5=>5
1922 //     <i>  Selects DMA Stream (only Stream 5 can be used)
1923 //     <o3> Channel <1=>1
1924 //     <i>  Selects DMA Channel (only Channel 1 can be used)
1925 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
1926 //     <i>  Selects DMA Priority
1927 //   </e>
1928 #define RTE_SPI6_TX_DMA                 0
1929 #define RTE_SPI6_TX_DMA_NUMBER          2
1930 #define RTE_SPI6_TX_DMA_STREAM          5
1931 #define RTE_SPI6_TX_DMA_CHANNEL         1
1932 #define RTE_SPI6_TX_DMA_PRIORITY        0
1933
1934 // </e>
1935
1936
1937 // <e> SAI1 (Serial Audio Interface 1) [Driver_SAI1]
1938 // <i> Configuration settings for Driver_SAI1 in component ::CMSIS Driver:SAI
1939 #define RTE_SAI1                        0
1940
1941 //   <o> SAI1_SD_A Pin <0=>Not Used <1=>PB2 <2=>PC1 <3=>PD6 <4=>PE6
1942 #define RTE_SAI1_SD_A_PORT_ID           0
1943 #if    (RTE_SAI1_SD_A_PORT_ID == 0)
1944 #define RTE_SAI1_SD_A_PIN               0
1945 #elif  (RTE_SAI1_SD_A_PORT_ID == 1)
1946 #define RTE_SAI1_SD_A_PIN               1
1947 #define RTE_SAI1_SD_A_PORT              GPIOB
1948 #define RTE_SAI1_SD_A_BIT               2
1949 #elif  (RTE_SAI1_SD_A_PORT_ID == 2)
1950 #define RTE_SAI1_SD_A_PIN               1
1951 #define RTE_SAI1_SD_A_PORT              GPIOC
1952 #define RTE_SAI1_SD_A_BIT               1
1953 #elif  (RTE_SAI1_SD_A_PORT_ID == 3)
1954 #define RTE_SAI1_SD_A_PIN               1
1955 #define RTE_SAI1_SD_A_PORT              GPIOD
1956 #define RTE_SAI1_SD_A_BIT               6
1957 #elif  (RTE_SAI1_SD_A_PORT_ID == 4)
1958 #define RTE_SAI1_SD_A_PIN               1
1959 #define RTE_SAI1_SD_A_PORT              GPIOE
1960 #define RTE_SAI1_SD_A_BIT               6
1961 #else
1962 #error "Invalid SAI1_SD_A Pin Configuration!"
1963 #endif
1964
1965 //   <o> SAI1_FS_A Pin <0=>Not Used <1=>PE4
1966 #define RTE_SAI1_FS_A_PORT_ID           0
1967 #if    (RTE_SAI1_FS_A_PORT_ID == 0)
1968 #define RTE_SAI1_FS_A_PIN               0
1969 #elif  (RTE_SAI1_FS_A_PORT_ID == 1)
1970 #define RTE_SAI1_FS_A_PIN               1
1971 #define RTE_SAI1_FS_A_PORT              GPIOE
1972 #define RTE_SAI1_FS_A_BIT               4
1973 #else
1974 #error "Invalid SAI1_FS_A Pin Configuration!"
1975 #endif
1976
1977 //   <o> SAI1_SCK_A Pin <0=>Not Used <1=>PE5
1978 #define RTE_SAI1_SCK_A_PORT_ID          0
1979 #if    (RTE_SAI1_SCK_A_PORT_ID == 0)
1980 #define RTE_SAI1_SCK_A_PIN              0
1981 #elif  (RTE_SAI1_SCK_A_PORT_ID == 1)
1982 #define RTE_SAI1_SCK_A_PIN              1
1983 #define RTE_SAI1_SCK_A_PORT             GPIOE
1984 #define RTE_SAI1_SCK_A_BIT              5
1985 #else
1986 #error "Invalid SAI1_SCK_A Pin Configuration!"
1987 #endif
1988
1989 //   <o> SAI1_MCLK_A Pin <0=>Not Used <1=>PE2 <2=>PG7
1990 #define RTE_SAI1_MCLK_A_PORT_ID         0
1991 #if    (RTE_SAI1_MCLK_A_PORT_ID == 0)
1992 #define RTE_SAI1_MCLK_A_PIN             0
1993 #elif  (RTE_SAI1_MCLK_A_PORT_ID == 1)
1994 #define RTE_SAI1_MCLK_A_PIN             1
1995 #define RTE_SAI1_MCLK_A_PORT            GPIOE
1996 #define RTE_SAI1_MCLK_A_BIT             2
1997 #elif  (RTE_SAI1_MCLK_A_PORT_ID == 2)
1998 #define RTE_SAI1_MCLK_A_PIN             1
1999 #define RTE_SAI1_MCLK_A_PORT            GPIOG
2000 #define RTE_SAI1_MCLK_A_BIT             7
2001 #else
2002 #error "Invalid SAI1_MCLK_A Pin Configuration!"
2003 #endif
2004
2005 //   <o> SAI1_SD_B Pin <0=>Not Used <1=>PE3 <2=>PF6
2006 #define RTE_SAI1_SD_B_PORT_ID           0
2007 #if    (RTE_SAI1_SD_B_PORT_ID == 0)
2008 #define RTE_SAI1_SD_B_PIN               0
2009 #elif  (RTE_SAI1_SD_B_PORT_ID == 1)
2010 #define RTE_SAI1_SD_B_PIN               1
2011 #define RTE_SAI1_SD_B_PORT              GPIOE
2012 #define RTE_SAI1_SD_B_BIT               3
2013 #elif  (RTE_SAI1_SD_B_PORT_ID == 2)
2014 #define RTE_SAI1_SD_B_PIN               1
2015 #define RTE_SAI1_SD_B_PORT              GPIOF
2016 #define RTE_SAI1_SD_B_BIT               6
2017 #else
2018 #error "Invalid SAI1_SD_B Pin Configuration!"
2019 #endif
2020
2021 //   <o> SAI1_FS_B Pin <0=>Not Used <1=>PF9
2022 #define RTE_SAI1_FS_B_PORT_ID           0
2023 #if    (RTE_SAI1_FS_B_PORT_ID == 0)
2024 #define RTE_SAI1_FS_B_PIN               0
2025 #elif  (RTE_SAI1_FS_B_PORT_ID == 1)
2026 #define RTE_SAI1_FS_B_PIN               1
2027 #define RTE_SAI1_FS_B_PORT              GPIOF
2028 #define RTE_SAI1_FS_B_BIT               9
2029 #else
2030 #error "Invalid SAI1_FS_B Pin Configuration!"
2031 #endif
2032
2033 //   <o> SAI1_SCK_B Pin <0=>Not Used <1=>PF8
2034 #define RTE_SAI1_SCK_B_PORT_ID          0
2035 #if    (RTE_SAI1_SCK_B_PORT_ID == 0)
2036 #define RTE_SAI1_SCK_B_PIN              0
2037 #elif  (RTE_SAI1_SCK_B_PORT_ID == 1)
2038 #define RTE_SAI1_SCK_B_PIN              1
2039 #define RTE_SAI1_SCK_B_PORT             GPIOF
2040 #define RTE_SAI1_SCK_B_BIT              8
2041 #else
2042 #error "Invalid SAI1_SCK_B Pin Configuration!"
2043 #endif
2044
2045 //   <o> SAI1_MCLK_B Pin <0=>Not Used <1=>PF7
2046 #define RTE_SAI1_MCLK_B_PORT_ID         0
2047 #if    (RTE_SAI1_MCLK_B_PORT_ID == 0)
2048 #define RTE_SAI1_MCLK_B_PIN             0
2049 #elif  (RTE_SAI1_MCLK_B_PORT_ID == 1)
2050 #define RTE_SAI1_MCLK_B_PIN             1
2051 #define RTE_SAI1_MCLK_B_PORT            GPIOF
2052 #define RTE_SAI1_MCLK_B_BIT             7
2053 #else
2054 #error "Invalid SAI1_MCLK_B Pin Configuration!"
2055 #endif
2056
2057 //   <e> DMA SAI1_A
2058 //     <o1> Number <2=>2
2059 //     <i>  Selects DMA Number (only DMA2 can be used)
2060 //     <o2> Stream <1=>1 <3=>3
2061 //     <i>  Selects DMA Stream (only Stream 1 or 3 can be used)
2062 //     <o3> Channel <0=>0
2063 //     <i>  Selects DMA Channel (only Channel 0 can be used)
2064 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2065 //     <i>  Selects DMA Priority
2066 //   </e>
2067 #define RTE_SAI1_A_DMA                  0
2068 #define RTE_SAI1_A_DMA_NUMBER           2
2069 #define RTE_SAI1_A_DMA_STREAM           1
2070 #define RTE_SAI1_A_DMA_CHANNEL          0
2071 #define RTE_SAI1_A_DMA_PRIORITY         0
2072
2073 //   <e> DMA SAI1_B
2074 //     <o1> Number <2=>2
2075 //     <i>  Selects DMA Number (only DMA2 can be used)
2076 //     <o2> Stream <4=>4 <5=>5 <7=>7
2077 //     <i>  Selects DMA Stream (only Stream 4, 5 or 7 can be used)
2078 //     <o3> Channel <0=>0 <1=>1
2079 //     <i>  Selects DMA Channel (only Channel 0 or 1 can be used)
2080 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2081 //     <i>  Selects DMA Priority
2082 //   </e>
2083 #define RTE_SAI1_B_DMA                  0
2084 #define RTE_SAI1_B_DMA_NUMBER           2
2085 #define RTE_SAI1_B_DMA_STREAM           5
2086 #define RTE_SAI1_B_DMA_CHANNEL          0
2087 #define RTE_SAI1_B_DMA_PRIORITY         0
2088
2089 // </e>
2090
2091 // <e> SAI2 (Serial Audio Interface 2) [Driver_SAI2]
2092 // <i> Configuration settings for Driver_SAI2 in component ::CMSIS Driver:SAI
2093 #define RTE_SAI2                        0
2094
2095 //   <o> SAI2_SD_A Pin <0=>Not Used <1=>PD11 <2=>PI6
2096 #define RTE_SAI2_SD_A_PORT_ID           0
2097 #if    (RTE_SAI2_SD_A_PORT_ID == 0)
2098 #define RTE_SAI2_SD_A_PIN               0
2099 #elif  (RTE_SAI2_SD_A_PORT_ID == 1)
2100 #define RTE_SAI2_SD_A_PIN               1
2101 #define RTE_SAI2_SD_A_PORT              GPIOD
2102 #define RTE_SAI2_SD_A_BIT               11
2103 #elif  (RTE_SAI2_SD_A_PORT_ID == 2)
2104 #define RTE_SAI2_SD_A_PIN               1
2105 #define RTE_SAI2_SD_A_PORT              GPIOI
2106 #define RTE_SAI2_SD_A_BIT               6
2107 #else
2108 #error "Invalid SAI2_SD_A Pin Configuration!"
2109 #endif
2110
2111 //   <o> SAI2_FS_A Pin <0=>Not Used <1=>PD12 <2=>PI7
2112 #define RTE_SAI2_FS_A_PORT_ID           0
2113 #if    (RTE_SAI2_FS_A_PORT_ID == 0)
2114 #define RTE_SAI2_FS_A_PIN               0
2115 #elif  (RTE_SAI2_FS_A_PORT_ID == 1)
2116 #define RTE_SAI2_FS_A_PIN               1
2117 #define RTE_SAI2_FS_A_PORT              GPIOD
2118 #define RTE_SAI2_FS_A_BIT               12
2119 #elif  (RTE_SAI2_FS_A_PORT_ID == 2)
2120 #define RTE_SAI2_FS_A_PIN               1
2121 #define RTE_SAI2_FS_A_PORT              GPIOI
2122 #define RTE_SAI2_FS_A_BIT               7
2123 #else
2124 #error "Invalid SAI2_FS_A Pin Configuration!"
2125 #endif
2126
2127 //   <o> SAI2_SCK_A Pin <0=>Not Used <1=>PD13 <2=>PI5
2128 #define RTE_SAI2_SCK_A_PORT_ID          0
2129 #if    (RTE_SAI2_SCK_A_PORT_ID == 0)
2130 #define RTE_SAI2_SCK_A_PIN              0
2131 #elif  (RTE_SAI2_SCK_A_PORT_ID == 1)
2132 #define RTE_SAI2_SCK_A_PIN              1
2133 #define RTE_SAI2_SCK_A_PORT             GPIOD
2134 #define RTE_SAI2_SCK_A_BIT              13
2135 #elif  (RTE_SAI2_SCK_A_PORT_ID == 2)
2136 #define RTE_SAI2_SCK_A_PIN              1
2137 #define RTE_SAI2_SCK_A_PORT             GPIOI
2138 #define RTE_SAI2_SCK_A_BIT              5
2139 #else
2140 #error "Invalid SAI2_SCK_A Pin Configuration!"
2141 #endif
2142
2143 //   <o> SAI2_MCLK_A Pin <0=>Not Used <1=>PE0 <2=>PI4
2144 #define RTE_SAI2_MCLK_A_PORT_ID         0
2145 #if    (RTE_SAI2_MCLK_A_PORT_ID == 0)
2146 #define RTE_SAI2_MCLK_A_PIN             0
2147 #elif  (RTE_SAI2_MCLK_A_PORT_ID == 1)
2148 #define RTE_SAI2_MCLK_A_PIN             1
2149 #define RTE_SAI2_MCLK_A_PORT            GPIOE
2150 #define RTE_SAI2_MCLK_A_BIT             0
2151 #elif  (RTE_SAI2_MCLK_A_PORT_ID == 2)
2152 #define RTE_SAI2_MCLK_A_PIN             1
2153 #define RTE_SAI2_MCLK_A_PORT            GPIOI
2154 #define RTE_SAI2_MCLK_A_BIT             4
2155 #else
2156 #error "Invalid SAI2_MCLK_A Pin Configuration!"
2157 #endif
2158
2159 //   <o> SAI2_SD_B Pin <0=>Not Used <1=>PA0 <2=>PE11 <3=>PF11 <4=>PG10
2160 #define RTE_SAI2_SD_B_PORT_ID           0
2161 #if    (RTE_SAI2_SD_B_PORT_ID == 0)
2162 #define RTE_SAI2_SD_B_PIN               0
2163 #elif  (RTE_SAI2_SD_B_PORT_ID == 1)
2164 #define RTE_SAI2_SD_B_PIN               1
2165 #define RTE_SAI2_SD_B_PORT              GPIOA
2166 #define RTE_SAI2_SD_B_BIT               0
2167 #elif  (RTE_SAI2_SD_B_PORT_ID == 2)
2168 #define RTE_SAI2_SD_B_PIN               1
2169 #define RTE_SAI2_SD_B_PORT              GPIOE
2170 #define RTE_SAI2_SD_B_BIT               11
2171 #elif  (RTE_SAI2_SD_B_PORT_ID == 3)
2172 #define RTE_SAI2_SD_B_PIN               1
2173 #define RTE_SAI2_SD_B_PORT              GPIOF
2174 #define RTE_SAI2_SD_B_BIT               11
2175 #elif  (RTE_SAI2_SD_B_PORT_ID == 4)
2176 #define RTE_SAI2_SD_B_PIN               1
2177 #define RTE_SAI2_SD_B_PORT              GPIOG
2178 #define RTE_SAI2_SD_B_BIT               10
2179 #else
2180 #error "Invalid SAI2_SD_B Pin Configuration!"
2181 #endif
2182
2183 //   <o> SAI2_FS_B Pin <0=>Not Used <1=>PA12 <2=>PC0 <3=>PE13 <4=>PG9
2184 #define RTE_SAI2_FS_B_PORT_ID           0
2185 #if    (RTE_SAI2_FS_B_PORT_ID == 0)
2186 #define RTE_SAI2_FS_B_PIN               0
2187 #elif  (RTE_SAI2_FS_B_PORT_ID == 1)
2188 #define RTE_SAI2_FS_B_PIN               1
2189 #define RTE_SAI2_FS_B_PORT              GPIOA
2190 #define RTE_SAI2_FS_B_BIT               12
2191 #elif  (RTE_SAI2_FS_B_PORT_ID == 2)
2192 #define RTE_SAI2_FS_B_PIN               1
2193 #define RTE_SAI2_FS_B_PORT              GPIOC
2194 #define RTE_SAI2_FS_B_BIT               0
2195 #elif  (RTE_SAI2_FS_B_PORT_ID == 3)
2196 #define RTE_SAI2_FS_B_PIN               1
2197 #define RTE_SAI2_FS_B_PORT              GPIOE
2198 #define RTE_SAI2_FS_B_BIT               13
2199 #elif  (RTE_SAI2_FS_B_PORT_ID == 4)
2200 #define RTE_SAI2_FS_B_PIN               1
2201 #define RTE_SAI2_FS_B_PORT              GPIOG
2202 #define RTE_SAI2_FS_B_BIT               9
2203 #else
2204 #error "Invalid SAI2_FS_B Pin Configuration!"
2205 #endif
2206
2207 //   <o> SAI2_SCK_B Pin <0=>Not Used <1=>PA2 <2=>PE12 <3=>PH2
2208 #define RTE_SAI2_SCK_B_PORT_ID          0
2209 #if    (RTE_SAI2_SCK_B_PORT_ID == 0)
2210 #define RTE_SAI2_SCK_B_PIN              0
2211 #elif  (RTE_SAI2_SCK_B_PORT_ID == 1)
2212 #define RTE_SAI2_SCK_B_PIN              1
2213 #define RTE_SAI2_SCK_B_PORT             GPIOA
2214 #define RTE_SAI2_SCK_B_BIT              2
2215 #elif  (RTE_SAI2_SCK_B_PORT_ID == 2)
2216 #define RTE_SAI2_SCK_B_PIN              1
2217 #define RTE_SAI2_SCK_B_PORT             GPIOE
2218 #define RTE_SAI2_SCK_B_BIT              12
2219 #elif  (RTE_SAI2_SCK_B_PORT_ID == 3)
2220 #define RTE_SAI2_SCK_B_PIN              1
2221 #define RTE_SAI2_SCK_B_PORT             GPIOH
2222 #define RTE_SAI2_SCK_B_BIT              2
2223 #else
2224 #error "Invalid SAI2_SCK_B Pin Configuration!"
2225 #endif
2226
2227 //   <o> SAI2_MCLK_B Pin <0=>Not Used <1=>PA1 <2=>PE6 <3=>PE14 <4=>PH3
2228 #define RTE_SAI2_MCLK_B_PORT_ID         0
2229 #if    (RTE_SAI2_MCLK_B_PORT_ID == 0)
2230 #define RTE_SAI2_MCLK_B_PIN             0
2231 #elif  (RTE_SAI2_MCLK_B_PORT_ID == 1)
2232 #define RTE_SAI2_MCLK_B_PIN             1
2233 #define RTE_SAI2_MCLK_B_PORT            GPIOA
2234 #define RTE_SAI2_MCLK_B_BIT             1
2235 #elif  (RTE_SAI2_MCLK_B_PORT_ID == 2)
2236 #define RTE_SAI2_MCLK_B_PIN             1
2237 #define RTE_SAI2_MCLK_B_PORT            GPIOE
2238 #define RTE_SAI2_MCLK_B_BIT             6
2239 #elif  (RTE_SAI2_MCLK_B_PORT_ID == 3)
2240 #define RTE_SAI2_MCLK_B_PIN             1
2241 #define RTE_SAI2_MCLK_B_PORT            GPIOE
2242 #define RTE_SAI2_MCLK_B_BIT             14
2243 #elif  (RTE_SAI2_MCLK_B_PORT_ID == 4)
2244 #define RTE_SAI2_MCLK_B_PIN             1
2245 #define RTE_SAI2_MCLK_B_PORT            GPIOH
2246 #define RTE_SAI2_MCLK_B_BIT             3
2247 #else
2248 #error "Invalid SAI2_MCLK_B Pin Configuration!"
2249 #endif
2250
2251 //   <e> DMA SAI2_A
2252 //     <o1> Number <2=>2
2253 //     <i>  Selects DMA Number (only DMA2 can be used)
2254 //     <o2> Stream <4=>4
2255 //     <i>  Selects DMA Stream (only Stream 4 can be used)
2256 //     <o3> Channel <3=>3
2257 //     <i>  Selects DMA Channel (only Channel 3 can be used)
2258 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2259 //     <i>  Selects DMA Priority
2260 //   </e>
2261 #define RTE_SAI2_A_DMA                  0
2262 #define RTE_SAI2_A_DMA_NUMBER           2
2263 #define RTE_SAI2_A_DMA_STREAM           4
2264 #define RTE_SAI2_A_DMA_CHANNEL          3
2265 #define RTE_SAI2_A_DMA_PRIORITY         0
2266
2267 //   <e> DMA SAI2_B
2268 //     <o1> Number <2=>2
2269 //     <i>  Selects DMA Number (only DMA2 can be used)
2270 //     <o2> Stream <6=>6 <7=>7
2271 //     <i>  Selects DMA Stream (only Stream 6 or 7 can be used)
2272 //     <o3> Channel <0=>0 <3=>3
2273 //     <i>  Selects DMA Channel (only Channel 0 or 3 can be used)
2274 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2275 //     <i>  Selects DMA Priority
2276 //   </e>
2277 #define RTE_SAI2_B_DMA                  0
2278 #define RTE_SAI2_B_DMA_NUMBER           2
2279 #define RTE_SAI2_B_DMA_STREAM           7
2280 #define RTE_SAI2_B_DMA_CHANNEL          0
2281 #define RTE_SAI2_B_DMA_PRIORITY         0
2282
2283 // </e>
2284
2285
2286 // <e> SDMMC1 (SD/SDIO/MMC card host interface 1) [Driver_MCI0]
2287 // <i> Configuration settings for Driver_MCI0 in component ::CMSIS Driver:MCI
2288 #define RTE_SDMMC1                      1
2289
2290 //   <h> SDMMC Peripheral Bus
2291 //     <o> SDMMC1_CK Pin <0=>PC12
2292 #define   RTE_SDMMC1_CK_PORT_ID         0
2293 #if      (RTE_SDMMC1_CK_PORT_ID == 0)
2294   #define RTE_SDMMC1_CK_PORT            GPIOC
2295   #define RTE_SDMMC1_CK_PIN             GPIO_PIN_12
2296 #else
2297   #error "Invalid SDMMC1_CLK Pin Configuration!"
2298 #endif
2299 //     <o> SDMMC1_CMD Pin <0=>PD2
2300 #define   RTE_SDMMC1_CMD_PORT_ID        0
2301 #if      (RTE_SDMMC1_CMD_PORT_ID == 0)
2302   #define RTE_SDMMC1_CMD_PORT           GPIOD
2303   #define RTE_SDMMC1_CMD_PIN            GPIO_PIN_2
2304 #else
2305   #error "Invalid SDMMC1_CMD Pin Configuration!"
2306 #endif
2307 //     <o> SDMMC1_D0 Pin <0=>PC8
2308 #define   RTE_SDMMC1_D0_PORT_ID         0
2309 #if      (RTE_SDMMC1_D0_PORT_ID == 0)
2310   #define RTE_SDMMC1_D0_PORT            GPIOC
2311   #define RTE_SDMMC1_D0_PIN             GPIO_PIN_8
2312 #else
2313   #error "Invalid SDMMC1_D0 Pin Configuration!"
2314 #endif
2315 //     <e> SDMMC1_D[1 .. 3]
2316 #define   RTE_SDMMC1_BUS_WIDTH_4        1
2317 //       <o> SDMMC1_D1 Pin <0=>PC9
2318 #define   RTE_SDMMC1_D1_PORT_ID         0
2319 #if      (RTE_SDMMC1_D1_PORT_ID == 0)
2320   #define RTE_SDMMC1_D1_PORT            GPIOC
2321   #define RTE_SDMMC1_D1_PIN             GPIO_PIN_9
2322 #else
2323   #error "Invalid SDMMC1_D1 Pin Configuration!"
2324 #endif
2325 //       <o> SDMMC1_D2 Pin <0=>PC10
2326 #define   RTE_SDMMC1_D2_PORT_ID         0
2327 #if      (RTE_SDMMC1_D2_PORT_ID == 0)
2328   #define RTE_SDMMC1_D2_PORT            GPIOC
2329   #define RTE_SDMMC1_D2_PIN             GPIO_PIN_10
2330 #else
2331   #error "Invalid SDMMC1_D2 Pin Configuration!"
2332 #endif
2333 //       <o> SDMMC1_D3 Pin <0=>PC11
2334 #define   RTE_SDMMC1_D3_PORT_ID         0
2335 #if      (RTE_SDMMC1_D3_PORT_ID == 0)
2336   #define RTE_SDMMC1_D3_PORT            GPIOC
2337   #define RTE_SDMMC1_D3_PIN             GPIO_PIN_11
2338 #else
2339   #error "Invalid SDMMC1_D3 Pin Configuration!"
2340 #endif
2341 //     </e> SDMMC1_D[1 .. 3]
2342 //     <e> SDMMC1_D[4 .. 7]
2343 #define   RTE_SDMMC1_BUS_WIDTH_8        0
2344 //       <o> SDMMC1_D4 Pin <0=>PB8
2345 #define   RTE_SDMMC1_D4_PORT_ID         0
2346 #if      (RTE_SDMMC1_D4_PORT_ID == 0)
2347   #define RTE_SDMMC1_D4_PORT            GPIOB
2348   #define RTE_SDMMC1_D4_PIN             GPIO_PIN_8
2349 #else
2350   #error "Invalid SDMMC1_D4 Pin Configuration!"
2351 #endif
2352 //       <o> SDMMC1_D5 Pin <0=>PB9
2353 #define   RTE_SDMMC1_D5_PORT_ID         0
2354 #if      (RTE_SDMMC1_D5_PORT_ID == 0)
2355   #define RTE_SDMMC1_D5_PORT            GPIOB
2356   #define RTE_SDMMC1_D5_PIN             GPIO_PIN_9
2357 #else
2358   #error "Invalid SDMMC1_D5 Pin Configuration!"
2359 #endif
2360 //       <o> SDMMC1_D6 Pin <0=>PC6
2361 #define   RTE_SDMMC1_D6_PORT_ID         0
2362 #if      (RTE_SDMMC1_D6_PORT_ID == 0)
2363   #define RTE_SDMMC1_D6_PORT            GPIOC
2364   #define RTE_SDMMC1_D6_PIN             GPIO_PIN_6
2365 #else
2366   #error "Invalid SDMMC1_D6 Pin Configuration!"
2367 #endif
2368 //       <o> SDMMC1_D7 Pin <0=>PC7
2369 #define   RTE_SDMMC1_D7_PORT_ID         0
2370 #if      (RTE_SDMMC1_D7_PORT_ID == 0)
2371   #define RTE_SDMMC1_D7_PORT            GPIOC
2372   #define RTE_SDMMC1_D7_PIN             GPIO_PIN_7
2373 #else
2374   #error "Invalid SDMMC1_D7 Pin Configuration!"
2375 #endif
2376 //     </e> SDMMC1_D[4 .. 7]
2377 //   </h> SDMMC Peripheral Bus
2378
2379 //   <e> Card Detect Pin
2380 //   <i> Configure Pin if exists
2381 //   <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
2382 //     <o1> Active State <0=>Low <1=>High
2383 //     <i>  Selects Active State Logical Level
2384 //     <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
2385 //               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
2386 //     <i>  Selects Port Name
2387 //     <o3> Bit <0-15>
2388 //     <i>  Selects Port Bit
2389 //     <o4> Pull Resistor <0=>Inactive <1=>Pull-up <2=>Pull-down
2390 //     <i>  Select Pin Pull Resistor function
2391 //   </e>
2392 #define RTE_SDMMC1_CD_PIN_EN            0
2393 #define RTE_SDMMC1_CD_ACTIVE            0
2394 #define RTE_SDMMC1_CD_PORT              GPIO_PORT(0)
2395 #define RTE_SDMMC1_CD_PIN               0
2396 #define RTE_SDMMC1_CD_PULL              1
2397
2398 //   <e> Write Protect Pin
2399 //   <i> Configure Pin if exists
2400 //   <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
2401 //     <o1> Active State <0=>Low <1=>High
2402 //     <i>  Selects Active State Logical Level
2403 //     <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
2404 //               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
2405 //     <i>  Selects Port Name
2406 //     <o3> Bit <0-15>
2407 //     <i>  Selects Port Bit
2408 //     <o4> Pull Resistor <0=>Inactive <1=>Pull-up <2=>Pull-down
2409 //     <i>  Select Pin Pull Resistor function
2410 //   </e>
2411 #define RTE_SDMMC1_WP_EN                0
2412 #define RTE_SDMMC1_WP_ACTIVE            0
2413 #define RTE_SDMMC1_WP_PORT              GPIO_PORT(0)
2414 #define RTE_SDMMC1_WP_PIN               0
2415 #define RTE_SDMMC1_WP_PULL              1
2416
2417 //   <e> DMA Rx
2418 //     <o1> Number <2=>2
2419 //     <i>  Selects DMA Number (only DMA2 can be used)
2420 //     <o2> Stream <3=>3 <6=>6
2421 //     <i>  Selects DMA Stream (only Stream 3 or 6 can be used)
2422 //     <o3> Channel <4=>4
2423 //     <i>  Selects DMA Channel (only Channel 4 can be used)
2424 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2425 //     <i>  Selects DMA Priority
2426 //   </e>
2427 #define RTE_SDMMC1_RX_DMA               1
2428 #define RTE_SDMMC1_RX_DMA_NUMBER        2
2429 #define RTE_SDMMC1_RX_DMA_STREAM        3
2430 #define RTE_SDMMC1_RX_DMA_CHANNEL       4
2431 #define RTE_SDMMC1_RX_DMA_PRIORITY      0
2432
2433 //   <e> DMA Tx
2434 //     <o1> Number <2=>2
2435 //     <i>  Selects DMA Number (only DMA2 can be used)
2436 //     <o2> Stream <3=>3 <6=>6
2437 //     <i>  Selects DMA Stream (only Stream 3 or 6 can be used)
2438 //     <o3> Channel <4=>4
2439 //     <i>  Selects DMA Channel (only Channel 4 can be used)
2440 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2441 //     <i>  Selects DMA Priority
2442 //   </e>
2443 #define RTE_SDMMC1_TX_DMA               1
2444 #define RTE_SDMMC1_TX_DMA_NUMBER        2
2445 #define RTE_SDMMC1_TX_DMA_STREAM        6
2446 #define RTE_SDMMC1_TX_DMA_CHANNEL       4
2447 #define RTE_SDMMC1_TX_DMA_PRIORITY      0
2448
2449 // </e>
2450
2451
2452 // <e> SDMMC2 (SD/SDIO/MMC card host interface 2) [Driver_MCI1]
2453 // <i> Configuration settings for Driver_MCI1 in component ::CMSIS Driver:MCI
2454 #define RTE_SDMMC2                      0
2455
2456 //   <h> SDMMC Peripheral Bus
2457 //     <o> SDMMC2_CK Pin <0=>PD6
2458 #define   RTE_SDMMC2_CK_PORT_ID         0
2459 #if      (RTE_SDMMC2_CK_PORT_ID == 0)
2460   #define RTE_SDMMC2_CK_PORT            GPIOD
2461   #define RTE_SDMMC2_CK_PIN             GPIO_PIN_6
2462   #define RTE_SDMMC2_CK_AF              GPIO_AF11_SDMMC2
2463 #else
2464   #error "Invalid SDMMC2_CLK Pin Configuration!"
2465 #endif
2466 //     <o> SDMMC2_CMD Pin <0=>PD7
2467 #define   RTE_SDMMC2_CMD_PORT_ID        0
2468 #if      (RTE_SDMMC2_CMD_PORT_ID == 0)
2469   #define RTE_SDMMC2_CMD_PORT           GPIOD
2470   #define RTE_SDMMC2_CMD_PIN            GPIO_PIN_7
2471   #define RTE_SDMMC2_CMD_AF             GPIO_AF11_SDMMC2
2472 #else
2473   #error "Invalid SDMMC2_CMD Pin Configuration!"
2474 #endif
2475 //     <o> SDMMC2_D0 Pin <0=>PB14 <1=>PG9
2476 #define   RTE_SDMMC2_D0_PORT_ID         0
2477 #if      (RTE_SDMMC2_D0_PORT_ID == 0)
2478   #define RTE_SDMMC2_D0_PORT            GPIOB
2479   #define RTE_SDMMC2_D0_PIN             GPIO_PIN_14
2480   #define RTE_SDMMC2_D0_AF              GPIO_AF10_SDMMC2
2481 #elif    (RTE_SDMMC2_D0_PORT_ID == 1)
2482   #define RTE_SDMMC2_D0_PORT            GPIOG
2483   #define RTE_SDMMC2_D0_PIN             GPIO_PIN_9
2484   #define RTE_SDMMC2_D0_AF              GPIO_AF11_SDMMC2
2485 #else
2486   #error "Invalid SDMMC2_D0 Pin Configuration!"
2487 #endif
2488 //     <e> SDMMC2_D[1 .. 3]
2489 #define   RTE_SDMMC2_BUS_WIDTH_4        1
2490 //       <o> SDMMC2_D1 Pin <0=>PB15 <1=>PG10
2491 #define   RTE_SDMMC2_D1_PORT_ID         0
2492 #if      (RTE_SDMMC2_D1_PORT_ID == 0)
2493   #define RTE_SDMMC2_D1_PORT            GPIOB
2494   #define RTE_SDMMC2_D1_PIN             GPIO_PIN_15
2495   #define RTE_SDMMC2_D1_AF              GPIO_AF10_SDMMC2
2496 #elif    (RTE_SDMMC2_D1_PORT_ID == 1)
2497   #define RTE_SDMMC2_D1_PORT            GPIOG
2498   #define RTE_SDMMC2_D1_PIN             GPIO_PIN_10
2499   #define RTE_SDMMC2_D1_AF              GPIO_AF11_SDMMC2
2500 #else
2501   #error "Invalid SDMMC2_D1 Pin Configuration!"
2502 #endif
2503 //       <o> SDMMC2_D2 Pin <0=>PB3 <1=>PG11
2504 #define   RTE_SDMMC2_D2_PORT_ID         0
2505 #if      (RTE_SDMMC2_D2_PORT_ID == 0)
2506   #define RTE_SDMMC2_D2_PORT            GPIOB
2507   #define RTE_SDMMC2_D2_PIN             GPIO_PIN_3
2508   #define RTE_SDMMC2_D2_AF              GPIO_AF10_SDMMC2
2509 #elif    (RTE_SDMMC2_D2_PORT_ID == 1)
2510   #define RTE_SDMMC2_D2_PORT            GPIOG
2511   #define RTE_SDMMC2_D2_PIN             GPIO_PIN_11
2512   #define RTE_SDMMC2_D2_AF              GPIO_AF10_SDMMC2
2513 #else
2514   #error "Invalid SDMMC2_D2 Pin Configuration!"
2515 #endif
2516 //       <o> SDMMC2_D3 Pin <0=>PB4 <1=>PG12
2517 #define   RTE_SDMMC2_D3_PORT_ID         0
2518 #if      (RTE_SDMMC2_D3_PORT_ID == 0)
2519   #define RTE_SDMMC2_D3_PORT            GPIOB
2520   #define RTE_SDMMC2_D3_PIN             GPIO_PIN_4
2521   #define RTE_SDMMC2_D3_AF              GPIO_AF10_SDMMC2
2522 #elif    (RTE_SDMMC2_D3_PORT_ID == 1)
2523   #define RTE_SDMMC2_D3_PORT            GPIOG
2524   #define RTE_SDMMC2_D3_PIN             GPIO_PIN_12
2525   #define RTE_SDMMC2_D3_AF              GPIO_AF11_SDMMC2
2526 #else
2527   #error "Invalid SDMMC2_D3 Pin Configuration!"
2528 #endif
2529 //     </e> SDMMC2_D[1 .. 3]
2530 //     <e> SDMMC2_D[4 .. 7]
2531 #define   RTE_SDMMC2_BUS_WIDTH_8        0
2532 //       <o> SDMMC2_D4 Pin <0=>PB8
2533 #define   RTE_SDMMC2_D4_PORT_ID         0
2534 #if      (RTE_SDMMC2_D4_PORT_ID == 0)
2535   #define RTE_SDMMC2_D4_PORT            GPIOB
2536   #define RTE_SDMMC2_D4_PIN             GPIO_PIN_8
2537   #define RTE_SDMMC2_D4_AF              GPIO_AF10_SDMMC2
2538 #else
2539   #error "Invalid SDMMC2_D4 Pin Configuration!"
2540 #endif
2541 //       <o> SDMMC2_D5 Pin <0=>PB9
2542 #define   RTE_SDMMC2_D5_PORT_ID         0
2543 #if      (RTE_SDMMC2_D5_PORT_ID == 0)
2544   #define RTE_SDMMC2_D5_PORT            GPIOB
2545   #define RTE_SDMMC2_D5_PIN             GPIO_PIN_9
2546   #define RTE_SDMMC2_D5_AF              GPIO_AF10_SDMMC2
2547 #else
2548   #error "Invalid SDMMC2_D5 Pin Configuration!"
2549 #endif
2550 //       <o> SDMMC2_D6 Pin <0=>PC6
2551 #define   RTE_SDMMC2_D6_PORT_ID         0
2552 #if      (RTE_SDMMC2_D6_PORT_ID == 0)
2553   #define RTE_SDMMC2_D6_PORT            GPIOC
2554   #define RTE_SDMMC2_D6_PIN             GPIO_PIN_6
2555   #define RTE_SDMMC2_D6_AF              GPIO_AF10_SDMMC2
2556 #else
2557   #error "Invalid SDMMC2_D6 Pin Configuration!"
2558 #endif
2559 //       <o> SDMMC2_D7 Pin <0=>PC7
2560 #define   RTE_SDMMC2_D7_PORT_ID         0
2561 #if      (RTE_SDMMC2_D7_PORT_ID == 0)
2562   #define RTE_SDMMC2_D7_PORT            GPIOC
2563   #define RTE_SDMMC2_D7_PIN             GPIO_PIN_7
2564   #define RTE_SDMMC2_D7_AF              GPIO_AF10_SDMMC2
2565 #else
2566   #error "Invalid SDMMC2_D7 Pin Configuration!"
2567 #endif
2568 //     </e> SDMMC2_D[4 .. 7]
2569 //   </h> SDMMC Peripheral Bus
2570
2571 //   <e> Card Detect Pin
2572 //   <i> Configure Pin if exists
2573 //   <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
2574 //     <o1> Active State <0=>Low <1=>High
2575 //     <i>  Selects Active State Logical Level
2576 //     <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
2577 //               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
2578 //     <i>  Selects Port Name
2579 //     <o3> Bit <0-15>
2580 //     <i>  Selects Port Bit
2581 //     <o4> Pull Resistor <0=>Inactive <1=>Pull-up <2=>Pull-down
2582 //     <i>  Select Pin Pull Resistor function
2583 //   </e>
2584 #define RTE_SDMMC2_CD_PIN_EN            1
2585 #define RTE_SDMMC2_CD_ACTIVE            0
2586 #define RTE_SDMMC2_CD_PORT              GPIO_PORT(2)
2587 #define RTE_SDMMC2_CD_PIN               12
2588 #define RTE_SDMMC2_CD_PULL              1
2589
2590 //   <e> Write Protect Pin
2591 //   <i> Configure Pin if exists
2592 //   <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
2593 //     <o1> Active State <0=>Low <1=>High
2594 //     <i>  Selects Active State Logical Level
2595 //     <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
2596 //               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
2597 //     <i>  Selects Port Name
2598 //     <o3> Bit <0-15>
2599 //     <i>  Selects Port Bit
2600 //     <o4> Pull Resistor <0=>Inactive <1=>Pull-up <2=>Pull-down
2601 //     <i>  Select Pin Pull Resistor function
2602 //   </e>
2603 #define RTE_SDMMC2_WP_EN                0
2604 #define RTE_SDMMC2_WP_ACTIVE            0
2605 #define RTE_SDMMC2_WP_PORT              GPIO_PORT(0)
2606 #define RTE_SDMMC2_WP_PIN               0
2607 #define RTE_SDMMC2_WP_PULL              1
2608
2609 //   <e> DMA Rx
2610 //     <o1> Number <2=>2
2611 //     <i>  Selects DMA Number (only DMA2 can be used)
2612 //     <o2> Stream <0=>0 <5=>5
2613 //     <i>  Selects DMA Stream (only Stream 0 or 5 can be used)
2614 //     <o3> Channel <11=>11
2615 //     <i>  Selects DMA Channel (only Channel 11 can be used)
2616 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2617 //     <i>  Selects DMA Priority
2618 //   </e>
2619 #define RTE_SDMMC2_RX_DMA               1
2620 #define RTE_SDMMC2_RX_DMA_NUMBER        2
2621 #define RTE_SDMMC2_RX_DMA_STREAM        0
2622 #define RTE_SDMMC2_RX_DMA_CHANNEL       11
2623 #define RTE_SDMMC2_RX_DMA_PRIORITY      0
2624
2625 //   <e> DMA Tx
2626 //     <o1> Number <2=>2
2627 //     <i>  Selects DMA Number (only DMA2 can be used)
2628 //     <o2> Stream <0=>0 <5=>5
2629 //     <i>  Selects DMA Stream (only Stream 0 or 5 can be used)
2630 //     <o3> Channel <11=>11
2631 //     <i>  Selects DMA Channel (only Channel 11 can be used)
2632 //     <o4> Priority <0=>Low <1=>Medium <2=>High <3=>Very High
2633 //     <i>  Selects DMA Priority
2634 //   </e>
2635 #define RTE_SDMMC2_TX_DMA               1
2636 #define RTE_SDMMC2_TX_DMA_NUMBER        2
2637 #define RTE_SDMMC2_TX_DMA_STREAM        5
2638 #define RTE_SDMMC2_TX_DMA_CHANNEL       11
2639 #define RTE_SDMMC2_TX_DMA_PRIORITY      0
2640
2641 // </e>
2642
2643
2644 // <e> CAN1 (Controller Area Network 1) [Driver_CAN1]
2645 // <i> Configuration settings for Driver_CAN1 in component ::CMSIS Driver:CAN
2646 #define RTE_CAN1                        0
2647
2648 //   <o> CAN1_RX Pin <0=>PA11 <1=>PB8 <2=>PD0 <3=>PI9 <4=>PH14
2649 #define RTE_CAN1_RX_PORT_ID             0
2650 #if    (RTE_CAN1_RX_PORT_ID == 0)
2651 #define RTE_CAN1_RX_PORT                GPIOA
2652 #define RTE_CAN1_RX_BIT                 GPIO_PIN_11
2653 #elif  (RTE_CAN1_RX_PORT_ID == 1)
2654 #define RTE_CAN1_RX_PORT                GPIOB
2655 #define RTE_CAN1_RX_BIT                 GPIO_PIN_8
2656 #elif  (RTE_CAN1_RX_PORT_ID == 2)
2657 #define RTE_CAN1_RX_PORT                GPIOD
2658 #define RTE_CAN1_RX_BIT                 GPIO_PIN_0
2659 #elif  (RTE_CAN1_RX_PORT_ID == 3)
2660 #define RTE_CAN1_RX_PORT                GPIOI
2661 #define RTE_CAN1_RX_BIT                 GPIO_PIN_9
2662 #elif  (RTE_CAN1_RX_PORT_ID == 4)
2663 #define RTE_CAN1_RX_PORT                GPIOH
2664 #define RTE_CAN1_RX_BIT                 GPIO_PIN_14
2665 #else
2666 #error "Invalid CAN1_RX Pin Configuration!"
2667 #endif
2668
2669 //   <o> CAN1_TX Pin <0=>PA12 <1=>PB9 <2=>PD1 <3=>PH13
2670 #define RTE_CAN1_TX_PORT_ID             0
2671 #if    (RTE_CAN1_TX_PORT_ID == 0)
2672 #define RTE_CAN1_TX_PORT                GPIOA
2673 #define RTE_CAN1_TX_BIT                 GPIO_PIN_12
2674 #elif  (RTE_CAN1_TX_PORT_ID == 1)
2675 #define RTE_CAN1_TX_PORT                GPIOB
2676 #define RTE_CAN1_TX_BIT                 GPIO_PIN_9
2677 #elif  (RTE_CAN1_TX_PORT_ID == 2)
2678 #define RTE_CAN1_TX_PORT                GPIOD
2679 #define RTE_CAN1_TX_BIT                 GPIO_PIN_1
2680 #elif  (RTE_CAN1_TX_PORT_ID == 3)
2681 #define RTE_CAN1_TX_PORT                GPIOH
2682 #define RTE_CAN1_TX_BIT                 GPIO_PIN_13
2683 #else
2684 #error "Invalid CAN1_TX Pin Configuration!"
2685 #endif
2686
2687 // </e>
2688
2689
2690 // <e> CAN2 (Controller Area Network 2) [Driver_CAN2]
2691 // <i> Configuration settings for Driver_CAN2 in component ::CMSIS Driver:CAN
2692 #define RTE_CAN2                        0
2693
2694 //   <o> CAN2_RX Pin <0=>PB5 <1=>PB12
2695 #define RTE_CAN2_RX_PORT_ID             0
2696 #if    (RTE_CAN2_RX_PORT_ID == 0)
2697 #define RTE_CAN2_RX_PORT                GPIOB
2698 #define RTE_CAN2_RX_BIT                 GPIO_PIN_5
2699 #elif  (RTE_CAN2_RX_PORT_ID == 1)
2700 #define RTE_CAN2_RX_PORT                GPIOB
2701 #define RTE_CAN2_RX_BIT                 GPIO_PIN_12
2702 #else
2703 #error "Invalid CAN2_RX Pin Configuration!"
2704 #endif
2705
2706 //   <o> CAN2_TX Pin <0=>PB6 <1=>PB13
2707 #define RTE_CAN2_TX_PORT_ID             0
2708 #if    (RTE_CAN2_TX_PORT_ID == 0)
2709 #define RTE_CAN2_TX_PORT                GPIOB
2710 #define RTE_CAN2_TX_BIT                 GPIO_PIN_6
2711 #elif  (RTE_CAN2_TX_PORT_ID == 1)
2712 #define RTE_CAN2_TX_PORT                GPIOB
2713 #define RTE_CAN2_TX_BIT                 GPIO_PIN_13
2714 #else
2715 #error "Invalid CAN2_TX Pin Configuration!"
2716 #endif
2717
2718 // </e>
2719
2720
2721 // <e> CAN3 (Controller Area Network 3) [Driver_CAN3]
2722 // <i> Configuration settings for Driver_CAN3 in component ::CMSIS Driver:CAN
2723 // <i> Available only on STM32F76x and STM32F77x device series
2724 #define RTE_CAN3                        0
2725
2726 //   <o> CAN3_RX Pin <0=>PA8 <1=>PB3
2727 #define RTE_CAN3_RX_PORT_ID             0
2728 #if    (RTE_CAN3_RX_PORT_ID == 0)
2729 #define RTE_CAN3_RX_PORT                GPIOA
2730 #define RTE_CAN3_RX_BIT                 GPIO_PIN_8
2731 #elif  (RTE_CAN3_RX_PORT_ID == 1)
2732 #define RTE_CAN3_RX_PORT                GPIOB
2733 #define RTE_CAN3_RX_BIT                 GPIO_PIN_3
2734 #else
2735 #error "Invalid CAN3_RX Pin Configuration!"
2736 #endif
2737
2738 //   <o> CAN3_TX Pin <0=>PA15 <1=>PB4
2739 #define RTE_CAN3_TX_PORT_ID             0
2740 #if    (RTE_CAN3_TX_PORT_ID == 0)
2741 #define RTE_CAN3_TX_PORT                GPIOA
2742 #define RTE_CAN3_TX_BIT                 GPIO_PIN_15
2743 #elif  (RTE_CAN3_TX_PORT_ID == 1)
2744 #define RTE_CAN3_TX_PORT                GPIOB
2745 #define RTE_CAN3_TX_BIT                 GPIO_PIN_4
2746 #else
2747 #error "Invalid CAN3_TX Pin Configuration!"
2748 #endif
2749
2750 // </e>
2751
2752
2753 // <e> ETH (Ethernet Interface) [Driver_ETH_MAC0]
2754 // <i> Configuration settings for Driver_ETH_MAC0 in component ::CMSIS Driver:Ethernet MAC
2755 #define RTE_ETH                         1
2756
2757 //   <e> MII (Media Independent Interface)
2758 #define RTE_ETH_MII                     0
2759
2760 //     <o> ETH_MII_TX_CLK Pin <0=>PC3
2761 #define RTE_ETH_MII_TX_CLK_PORT_ID      0
2762 #if    (RTE_ETH_MII_TX_CLK_PORT_ID == 0)
2763 #define RTE_ETH_MII_TX_CLK_PORT         GPIOC
2764 #define RTE_ETH_MII_TX_CLK_PIN          3
2765 #else
2766 #error "Invalid ETH_MII_TX_CLK Pin Configuration!"
2767 #endif
2768 //     <o> ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13
2769 #define RTE_ETH_MII_TXD0_PORT_ID        0
2770 #if    (RTE_ETH_MII_TXD0_PORT_ID == 0)
2771 #define RTE_ETH_MII_TXD0_PORT           GPIOB
2772 #define RTE_ETH_MII_TXD0_PIN            12
2773 #elif  (RTE_ETH_MII_TXD0_PORT_ID == 1)
2774 #define RTE_ETH_MII_TXD0_PORT           GPIOG
2775 #define RTE_ETH_MII_TXD0_PIN            13
2776 #else
2777 #error "Invalid ETH_MII_TXD0 Pin Configuration!"
2778 #endif
2779 //     <o> ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14
2780 #define RTE_ETH_MII_TXD1_PORT_ID        0
2781 #if    (RTE_ETH_MII_TXD1_PORT_ID == 0)
2782 #define RTE_ETH_MII_TXD1_PORT           GPIOB
2783 #define RTE_ETH_MII_TXD1_PIN            13
2784 #elif  (RTE_ETH_MII_TXD1_PORT_ID == 1)
2785 #define RTE_ETH_MII_TXD1_PORT           GPIOG
2786 #define RTE_ETH_MII_TXD1_PIN            14
2787 #else
2788 #error "Invalid ETH_MII_TXD1 Pin Configuration!"
2789 #endif
2790 //     <o> ETH_MII_TXD2 Pin <0=>PC2
2791 #define RTE_ETH_MII_TXD2_PORT_ID        0
2792 #if    (RTE_ETH_MII_TXD2_PORT_ID == 0)
2793 #define RTE_ETH_MII_TXD2_PORT           GPIOC
2794 #define RTE_ETH_MII_TXD2_PIN            2
2795 #else
2796 #error "Invalid ETH_MII_TXD2 Pin Configuration!"
2797 #endif
2798 //     <o> ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2
2799 #define RTE_ETH_MII_TXD3_PORT_ID        0
2800 #if    (RTE_ETH_MII_TXD3_PORT_ID == 0)
2801 #define RTE_ETH_MII_TXD3_PORT           GPIOB
2802 #define RTE_ETH_MII_TXD3_PIN            8
2803 #elif  (RTE_ETH_MII_TXD3_PORT_ID == 1)
2804 #define RTE_ETH_MII_TXD3_PORT           GPIOE
2805 #define RTE_ETH_MII_TXD3_PIN            2
2806 #else
2807 #error "Invalid ETH_MII_TXD3 Pin Configuration!"
2808 #endif
2809 //     <o> ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11
2810 #define RTE_ETH_MII_TX_EN_PORT_ID       0
2811 #if    (RTE_ETH_MII_TX_EN_PORT_ID == 0)
2812 #define RTE_ETH_MII_TX_EN_PORT          GPIOB
2813 #define RTE_ETH_MII_TX_EN_PIN           11
2814 #elif  (RTE_ETH_MII_TX_EN_PORT_ID == 1)
2815 #define RTE_ETH_MII_TX_EN_PORT          GPIOG
2816 #define RTE_ETH_MII_TX_EN_PIN           11
2817 #else
2818 #error "Invalid ETH_MII_TX_EN Pin Configuration!"
2819 #endif
2820 //     <o> ETH_MII_RX_CLK Pin <0=>PA1
2821 #define RTE_ETH_MII_RX_CLK_PORT_ID        0
2822 #if    (RTE_ETH_MII_RX_CLK_PORT_ID == 0)
2823 #define RTE_ETH_MII_RX_CLK_PORT         GPIOA
2824 #define RTE_ETH_MII_RX_CLK_PIN          1
2825 #else
2826 #error "Invalid ETH_MII_RX_CLK Pin Configuration!"
2827 #endif
2828 //     <o> ETH_MII_RXD0 Pin <0=>PC4
2829 #define RTE_ETH_MII_RXD0_PORT_ID        0
2830 #if    (RTE_ETH_MII_RXD0_PORT_ID == 0)
2831 #define RTE_ETH_MII_RXD0_PORT           GPIOC
2832 #define RTE_ETH_MII_RXD0_PIN            4
2833 #else
2834 #error "Invalid ETH_MII_RXD0 Pin Configuration!"
2835 #endif
2836 //     <o> ETH_MII_RXD1 Pin <0=>PC5
2837 #define RTE_ETH_MII_RXD1_PORT_ID        0
2838 #if    (RTE_ETH_MII_RXD1_PORT_ID == 0)
2839 #define RTE_ETH_MII_RXD1_PORT           GPIOC
2840 #define RTE_ETH_MII_RXD1_PIN            5
2841 #else
2842 #error "Invalid ETH_MII_RXD1 Pin Configuration!"
2843 #endif
2844 //     <o> ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6
2845 #define RTE_ETH_MII_RXD2_PORT_ID        0
2846 #if    (RTE_ETH_MII_RXD2_PORT_ID == 0)
2847 #define RTE_ETH_MII_RXD2_PORT           GPIOB
2848 #define RTE_ETH_MII_RXD2_PIN            0
2849 #elif  (RTE_ETH_MII_RXD2_PORT_ID == 1)
2850 #define RTE_ETH_MII_RXD2_PORT           GPIOH
2851 #define RTE_ETH_MII_RXD2_PIN            6
2852 #else
2853 #error "Invalid ETH_MII_RXD2 Pin Configuration!"
2854 #endif
2855 //     <o> ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7
2856 #define RTE_ETH_MII_RXD3_PORT_ID        0
2857 #if    (RTE_ETH_MII_RXD3_PORT_ID == 0)
2858 #define RTE_ETH_MII_RXD3_PORT           GPIOB
2859 #define RTE_ETH_MII_RXD3_PIN            1
2860 #elif  (RTE_ETH_MII_RXD3_PORT_ID == 1)
2861 #define RTE_ETH_MII_RXD3_PORT           GPIOH
2862 #define RTE_ETH_MII_RXD3_PIN            7
2863 #else
2864 #error "Invalid ETH_MII_RXD3 Pin Configuration!"
2865 #endif
2866 //     <o> ETH_MII_RX_DV Pin <0=>PA7
2867 #define RTE_ETH_MII_RX_DV_PORT_ID       0
2868 #if    (RTE_ETH_MII_RX_DV_PORT_ID == 0)
2869 #define RTE_ETH_MII_RX_DV_PORT          GPIOA
2870 #define RTE_ETH_MII_RX_DV_PIN           7
2871 #else
2872 #error "Invalid ETH_MII_RX_DV Pin Configuration!"
2873 #endif
2874 //     <o> ETH_MII_RX_ER Pin <0=>Not Used <1=>PB10 <2=>PI10
2875 #define RTE_ETH_MII_RX_ER_PORT_ID       0
2876 #if    (RTE_ETH_MII_RX_ER_PORT_ID == 0)
2877 #define RTE_ETH_MII_RX_ER_PORT          NULL
2878 #elif  (RTE_ETH_MII_RX_ER_PORT_ID == 1)
2879 #define RTE_ETH_MII_RX_ER_PORT          GPIOB
2880 #define RTE_ETH_MII_RX_ER_PIN           10
2881 #elif  (RTE_ETH_MII_RX_ER_PORT_ID == 2)
2882 #define RTE_ETH_MII_RX_ER_PORT          GPIOI
2883 #define RTE_ETH_MII_RX_ER_PIN           10
2884 #else
2885 #error "Invalid ETH_MII_RX_ER Pin Configuration!"
2886 #endif
2887 //     <o> ETH_MII_CRS Pin <0=>Not Used <1=>PA0 <2=>PH2
2888 #define RTE_ETH_MII_CRS_PORT_ID         0
2889 #if    (RTE_ETH_MII_CRS_PORT_ID == 0)
2890 #define RTE_ETH_MII_CRS_PORT            NULL
2891 #elif  (RTE_ETH_MII_CRS_PORT_ID == 1)
2892 #define RTE_ETH_MII_CRS_PORT            GPIOA
2893 #define RTE_ETH_MII_CRS_PIN             0
2894 #elif  (RTE_ETH_MII_CRS_PORT_ID == 2)
2895 #define RTE_ETH_MII_CRS_PORT            GPIOH
2896 #define RTE_ETH_MII_CRS_PIN             2
2897 #else
2898 #error "Invalid ETH_MII_CRS Pin Configuration!"
2899 #endif
2900 //     <o> ETH_MII_COL Pin <0=>Not Used <1=>PA3 <2=>PH3
2901 #define RTE_ETH_MII_COL_PORT_ID         0
2902 #if    (RTE_ETH_MII_COL_PORT_ID == 0)
2903 #define RTE_ETH_MII_COL_PORT            NULL
2904 #elif  (RTE_ETH_MII_COL_PORT_ID == 1)
2905 #define RTE_ETH_MII_COL_PORT            GPIOA
2906 #define RTE_ETH_MII_COL_PIN             3
2907 #elif  (RTE_ETH_MII_COL_PORT_ID == 2)
2908 #define RTE_ETH_MII_COL_PORT            GPIOH
2909 #define RTE_ETH_MII_COL_PIN             3
2910 #else
2911 #error "Invalid ETH_MII_COL Pin Configuration!"
2912 #endif
2913
2914 //   </e>
2915
2916 //   <e> RMII (Reduced Media Independent Interface)
2917 #define RTE_ETH_RMII                    1
2918
2919 //     <o> ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13
2920 #define RTE_ETH_RMII_TXD0_PORT_ID       1
2921 #if    (RTE_ETH_RMII_TXD0_PORT_ID == 0)
2922 #define RTE_ETH_RMII_TXD0_PORT          GPIOB
2923 #define RTE_ETH_RMII_TXD0_PIN           12
2924 #elif  (RTE_ETH_RMII_TXD0_PORT_ID == 1)
2925 #define RTE_ETH_RMII_TXD0_PORT          GPIOG
2926 #define RTE_ETH_RMII_TXD0_PIN           13
2927 #else
2928 #error "Invalid ETH_RMII_TXD0 Pin Configuration!"
2929 #endif
2930 //     <o> ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14
2931 #define RTE_ETH_RMII_TXD1_PORT_ID       1
2932 #if    (RTE_ETH_RMII_TXD1_PORT_ID == 0)
2933 #define RTE_ETH_RMII_TXD1_PORT          GPIOB
2934 #define RTE_ETH_RMII_TXD1_PIN           13
2935 #elif  (RTE_ETH_RMII_TXD1_PORT_ID == 1)
2936 #define RTE_ETH_RMII_TXD1_PORT          GPIOG
2937 #define RTE_ETH_RMII_TXD1_PIN           14
2938 #else
2939 #error "Invalid ETH_RMII_TXD1 Pin Configuration!"
2940 #endif
2941 //     <o> ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11
2942 #define RTE_ETH_RMII_TX_EN_PORT_ID      1
2943 #if    (RTE_ETH_RMII_TX_EN_PORT_ID == 0)
2944 #define RTE_ETH_RMII_TX_EN_PORT         GPIOB
2945 #define RTE_ETH_RMII_TX_EN_PIN          11
2946 #elif  (RTE_ETH_RMII_TX_EN_PORT_ID == 1)
2947 #define RTE_ETH_RMII_TX_EN_PORT         GPIOG
2948 #define RTE_ETH_RMII_TX_EN_PIN          11
2949 #else
2950 #error "Invalid ETH_RMII_TX_EN Pin Configuration!"
2951 #endif
2952 //     <o> ETH_RMII_RXD0 Pin <0=>PC4
2953 #define RTE_ETH_RMII_RXD0_PORT_ID       0
2954 #if    (RTE_ETH_RMII_RXD0_PORT_ID == 0)
2955 #define RTE_ETH_RMII_RXD0_PORT          GPIOC
2956 #define RTE_ETH_RMII_RXD0_PIN           4
2957 #else
2958 #error "Invalid ETH_RMII_RXD0 Pin Configuration!"
2959 #endif
2960 //     <o> ETH_RMII_RXD1 Pin <0=>PC5
2961 #define RTE_ETH_RMII_RXD1_PORT_ID       0
2962 #if    (RTE_ETH_RMII_RXD1_PORT_ID == 0)
2963 #define RTE_ETH_RMII_RXD1_PORT          GPIOC
2964 #define RTE_ETH_RMII_RXD1_PIN           5
2965 #else
2966 #error "Invalid ETH_RMII_RXD1 Pin Configuration!"
2967 #endif
2968 //     <o> ETH_RMII_REF_CLK Pin <0=>PA1
2969 #define RTE_ETH_RMII_REF_CLK_PORT_ID    0
2970 #if    (RTE_ETH_RMII_REF_CLK_PORT_ID == 0)
2971 #define RTE_ETH_RMII_REF_CLK_PORT       GPIOA
2972 #define RTE_ETH_RMII_REF_CLK_PIN        1
2973 #else
2974 #error "Invalid ETH_RMII_REF_CLK Pin Configuration!"
2975 #endif
2976 //     <o> ETH_RMII_CRS_DV Pin <0=>PA7
2977 #define RTE_ETH_RMII_CRS_DV_PORT_ID     0
2978 #if    (RTE_ETH_RMII_CRS_DV_PORT_ID == 0)
2979 #define RTE_ETH_RMII_CRS_DV_PORT        GPIOA
2980 #define RTE_ETH_RMII_CRS_DV_PIN         7
2981 #else
2982 #error "Invalid ETH_RMII_CRS_DV Pin Configuration!"
2983 #endif
2984
2985 //   </e>
2986
2987 //   <h> SMI (Station Management Interface)
2988 //     <e> Hardware controlled
2989 //     <i> Enable peripheral controlled SMI on dedicated pins
2990 #define RTE_ETH_SMI_HW                  1
2991 //       <o> ETH_MDC Pin <0=>PC1
2992 #define RTE_ETH_SMI_MDC_PORT_ID         0
2993 #if    (RTE_ETH_SMI_MDC_PORT_ID == 0)
2994 #define RTE_ETH_SMI_MDC_PORT            GPIOC
2995 #define RTE_ETH_SMI_MDC_PIN             1
2996 #else
2997 #error "Invalid ETH_MDC Pin Configuration!"
2998 #endif
2999 //       <o> ETH_MDIO Pin <0=>PA2
3000 #define RTE_ETH_SMI_MDIO_PORT_ID        0
3001 #if    (RTE_ETH_SMI_MDIO_PORT_ID == 0)
3002 #define RTE_ETH_SMI_MDIO_PORT           GPIOA
3003 #define RTE_ETH_SMI_MDIO_PIN            2
3004 #else
3005 #error "Invalid ETH_MDIO Pin Configuration!"
3006 #endif
3007 //     </e>
3008
3009 //     <e> Software controlled
3010 //     <i> Enable software controlled SMI on arbitrary GPIO pins
3011 #define RTE_ETH_SMI_SW                  0
3012 //       <h> ETH_MDC Pin
3013 //       <i> Configure arbitrary GPIO as MDC Pin
3014 //       <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
3015 //         <o0> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3016 //                   <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
3017 //         <i>  Selects Port Name
3018 //         <o1> Bit <0-15>
3019 //         <i>  Selects Port Bit
3020 #define RTE_ETH_SMI_SW_MDC_PORT         GPIO_PORT(6)
3021 #define RTE_ETH_SMI_SW_MDC_PIN          7
3022 //       </h>
3023
3024 //       <h> ETH_MDIO Pin
3025 //       <i> Configure arbitrary GPIO as MDIO Pin
3026 //       <i> GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
3027 //         <o0> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3028 //                   <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
3029 //         <i>  Selects Port Name
3030 //         <o1> Bit <0-15>
3031 //         <i>  Selects Port Bit
3032 #define RTE_ETH_SMI_SW_MDIO_PORT        GPIO_PORT(6)
3033 #define RTE_ETH_SMI_SW_MDIO_PIN         6
3034 //       </h>
3035 //     </e>
3036 //   </h>
3037 //   <o> DMA Descriptor/Buffer Memory Address <0x20000000-0xE0000000>
3038 //   <i> Configure location of the Ethernet DMA Descriptor and Buffer memory
3039 #define RTE_ETH_DMA_MEM_ADDR            0x2000C000
3040
3041 // </e>
3042
3043
3044 // <e> USB OTG Full-speed
3045 #define RTE_USB_OTG_FS                  0
3046
3047 //   <e> Device [Driver_USBD0]
3048 //   <i> Configuration settings for Driver_USBD0 in component ::CMSIS Driver:USB Device
3049
3050 #define RTE_USB_OTG_FS_DEVICE           1
3051
3052 //     <o0.0> VBUS Sensing Pin
3053 //     <i> Enable or disable VBUS sensing
3054 #define RTE_OTG_FS_VBUS_SENSING_PIN     1
3055 //   </e>
3056
3057 //   <e> Host [Driver_USBH0]
3058 //   <i> Configuration settings for Driver_USBH0 in component ::CMSIS Driver:USB Host
3059
3060 #define RTE_USB_OTG_FS_HOST             0
3061
3062 //     <e> VBUS Power On/Off Pin
3063 //     <i> Configure Pin for driving VBUS
3064 //     <i> GPIO Pxy (x = A..J, y = 0..15) or (x = K, y = 0..7)
3065 //       <o1> Active State <0=>Low <1=>High
3066 //       <i>  Selects Active State Logical Level
3067 //       <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3068 //                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH
3069 //                 <8=>GPIOI <8=>GPIOJ <9=>GPIOK
3070 //       <i>  Selects Port Name
3071 //       <o3> Bit <0-15>
3072 //       <i>  Selects Port Bit
3073 //     </e>
3074 #define RTE_OTG_FS_VBUS_PIN             0
3075 #define RTE_OTG_FS_VBUS_ACTIVE          0
3076 #define RTE_OTG_FS_VBUS_PORT            GPIO_PORT(0)
3077 #define RTE_OTG_FS_VBUS_BIT             0
3078
3079 //     <e> Overcurrent Detection Pin
3080 //     <i> Configure Pin for overcurrent detection
3081 //     <i> GPIO Pxy (x = A..J, y = 0..15) or (x = K, y = 0..7)
3082 //       <o1> Active State <0=>Low <1=>High
3083 //       <i>  Selects Active State Logical Level
3084 //       <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3085 //                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH
3086 //                 <8=>GPIOI <8=>GPIOJ <9=>GPIOK
3087 //       <i>  Selects Port Name
3088 //       <o3> Bit <0-15>
3089 //       <i>  Selects Port Bit
3090 //     </e>
3091 #define RTE_OTG_FS_OC_PIN               0
3092 #define RTE_OTG_FS_OC_ACTIVE            0
3093 #define RTE_OTG_FS_OC_PORT              GPIO_PORT(0)
3094 #define RTE_OTG_FS_OC_BIT               0
3095 //   </e>
3096
3097 // </e>
3098
3099
3100 // <e> USB OTG High-speed
3101 #define RTE_USB_OTG_HS                  1
3102
3103 //   <h> PHY (Physical Layer)
3104
3105 //     <o> PHY Interface
3106 //       <0=>On-chip full-speed PHY
3107 //       <1=>External ULPI high-speed PHY
3108 //       <2=>Internal UTMI high-speed PHY
3109 #define RTE_USB_OTG_HS_PHY              1
3110
3111 //     <h> External ULPI Pins (UTMI+ Low Pin Interface)
3112
3113 //       <o> OTG_HS_ULPI_CK Pin <0=>PA5
3114 #define RTE_USB_OTG_HS_ULPI_CK_PORT_ID  0
3115 #if    (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0)
3116 #define RTE_USB_OTG_HS_ULPI_CK_PORT     GPIOA
3117 #define RTE_USB_OTG_HS_ULPI_CK_PIN      5
3118 #else
3119 #error "Invalid OTG_HS_ULPI_CK Pin Configuration!"
3120 #endif
3121 //       <o> OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2
3122 #define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0
3123 #if    (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0)
3124 #define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOI
3125 #define RTE_USB_OTG_HS_ULPI_DIR_PIN     11
3126 #elif  (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1)
3127 #define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOC
3128 #define RTE_USB_OTG_HS_ULPI_DIR_PIN     2
3129 #else
3130 #error "Invalid OTG_HS_ULPI_DIR Pin Configuration!"
3131 #endif
3132 //       <o> OTG_HS_ULPI_STP Pin <0=>PC0
3133 #define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0
3134 #if    (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0)
3135 #define RTE_USB_OTG_HS_ULPI_STP_PORT    GPIOC
3136 #define RTE_USB_OTG_HS_ULPI_STP_PIN     0
3137 #else
3138 #error "Invalid OTG_HS_ULPI_STP Pin Configuration!"
3139 #endif
3140 //       <o> OTG_HS_ULPI_NXT Pin <0=>PC3 <1=>PH4
3141 #define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1
3142 #if    (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0)
3143 #define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOC
3144 #define RTE_USB_OTG_HS_ULPI_NXT_PIN     3
3145 #elif  (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1)
3146 #define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOH
3147 #define RTE_USB_OTG_HS_ULPI_NXT_PIN     4
3148 #else
3149 #error "Invalid OTG_HS_ULPI_NXT Pin Configuration!"
3150 #endif
3151 //       <o> OTG_HS_ULPI_D0 Pin <0=>PA3
3152 #define RTE_USB_OTG_HS_ULPI_D0_PORT_ID  0
3153 #if    (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0)
3154 #define RTE_USB_OTG_HS_ULPI_D0_PORT     GPIOA
3155 #define RTE_USB_OTG_HS_ULPI_D0_PIN      3
3156 #else
3157 #error "Invalid OTG_HS_ULPI_D0 Pin Configuration!"
3158 #endif
3159 //       <o> OTG_HS_ULPI_D1 Pin <0=>PB0
3160 #define RTE_USB_OTG_HS_ULPI_D1_PORT_ID  0
3161 #if    (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0)
3162 #define RTE_USB_OTG_HS_ULPI_D1_PORT     GPIOB
3163 #define RTE_USB_OTG_HS_ULPI_D1_PIN      0
3164 #else
3165 #error "Invalid OTG_HS_ULPI_D1 Pin Configuration!"
3166 #endif
3167 //       <o> OTG_HS_ULPI_D2 Pin <0=>PB1
3168 #define RTE_USB_OTG_HS_ULPI_D2_PORT_ID  0
3169 #if    (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0)
3170 #define RTE_USB_OTG_HS_ULPI_D2_PORT     GPIOB
3171 #define RTE_USB_OTG_HS_ULPI_D2_PIN      1
3172 #else
3173 #error "Invalid OTG_HS_ULPI_D2 Pin Configuration!"
3174 #endif
3175 //       <o> OTG_HS_ULPI_D3 Pin <0=>PB10
3176 #define RTE_USB_OTG_HS_ULPI_D3_PORT_ID  0
3177 #if    (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0)
3178 #define RTE_USB_OTG_HS_ULPI_D3_PORT     GPIOB
3179 #define RTE_USB_OTG_HS_ULPI_D3_PIN      10
3180 #else
3181 #error "Invalid OTG_HS_ULPI_D3 Pin Configuration!"
3182 #endif
3183 //       <o> OTG_HS_ULPI_D4 Pin <0=>PB11
3184 #define RTE_USB_OTG_HS_ULPI_D4_PORT_ID  0
3185 #if    (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0)
3186 #define RTE_USB_OTG_HS_ULPI_D4_PORT     GPIOB
3187 #define RTE_USB_OTG_HS_ULPI_D4_PIN      11
3188 #else
3189 #error "Invalid OTG_HS_ULPI_D4 Pin Configuration!"
3190 #endif
3191 //       <o> OTG_HS_ULPI_D5 Pin <0=>PB12
3192 #define RTE_USB_OTG_HS_ULPI_D5_PORT_ID  0
3193 #if    (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0)
3194 #define RTE_USB_OTG_HS_ULPI_D5_PORT     GPIOB
3195 #define RTE_USB_OTG_HS_ULPI_D5_PIN      12
3196 #else
3197 #error "Invalid OTG_HS_ULPI_D5 Pin Configuration!"
3198 #endif
3199 //       <o> OTG_HS_ULPI_D6 Pin <0=>PB13
3200 #define RTE_USB_OTG_HS_ULPI_D6_PORT_ID  0
3201 #if    (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0)
3202 #define RTE_USB_OTG_HS_ULPI_D6_PORT     GPIOB
3203 #define RTE_USB_OTG_HS_ULPI_D6_PIN      13
3204 #else
3205 #error "Invalid OTG_HS_ULPI_D6 Pin Configuration!"
3206 #endif
3207 //       <o> OTG_HS_ULPI_D7 Pin <0=>PB5
3208 #define RTE_USB_OTG_HS_ULPI_D7_PORT_ID  0
3209 #if    (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0)
3210 #define RTE_USB_OTG_HS_ULPI_D7_PORT     GPIOB
3211 #define RTE_USB_OTG_HS_ULPI_D7_PIN      5
3212 #else
3213 #error "Invalid OTG_HS_ULPI_D7 Pin Configuration!"
3214 #endif
3215
3216 //     </h>
3217
3218 //   </h>
3219
3220 //   <e> Device [Driver_USBD1]
3221 //   <i> Configuration settings for Driver_USBD1 in component ::CMSIS Driver:USB Device
3222
3223 #define RTE_USB_OTG_HS_DEVICE           0
3224
3225 //     <o0.0> VBUS Sensing Pin
3226 //     <i> Enable or disable VBUS sensing
3227 //     <i> Relevant only if PHY Interface On-chip full-speed PHY is selected
3228 #define RTE_OTG_HS_VBUS_SENSING_PIN     0
3229 //   </e>
3230
3231 //   <e> Host [Driver_USBH1]
3232 //   <i> Configuration settings for Driver_USBH1 in component ::CMSIS Driver:USB Host
3233 #define RTE_USB_OTG_HS_HOST             1
3234
3235 //     <e> VBUS Power On/Off Pin
3236 //     <i> Configure Pin for driving VBUS
3237 //     <i> GPIO Pxy (x = A..J, y = 0..15) or (x = K, y = 0..7)
3238 //       <o1> Active State <0=>Low <1=>High
3239 //       <i>  Selects Active State Logical Level
3240 //       <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3241 //                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH
3242 //                 <8=>GPIOI <8=>GPIOJ <9=>GPIOK
3243 //       <i>  Selects Port Name
3244 //       <o3> Bit <0-15>
3245 //       <i>  Selects Port Bit
3246 //     </e>
3247 #define RTE_OTG_HS_VBUS_PIN             1
3248 #define RTE_OTG_HS_VBUS_ACTIVE          0
3249 #define RTE_OTG_HS_VBUS_PORT            GPIO_PORT(2)
3250 #define RTE_OTG_HS_VBUS_BIT             2
3251
3252 //     <e> Overcurrent Detection Pin
3253 //     <i> Configure Pin for overcurrent detection
3254 //     <i> GPIO Pxy (x = A..J, y = 0..15) or (x = K, y = 0..7)
3255 //       <o1> Active State <0=>Low <1=>High
3256 //       <i>  Selects Active State Logical Level
3257 //       <o2> Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
3258 //                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH
3259 //                 <8=>GPIOI <8=>GPIOJ <9=>GPIOK
3260 //       <i>  Selects Port Name
3261 //       <o3> Bit <0-15>
3262 //       <i>  Selects Port Bit
3263 //     </e>
3264 #define RTE_OTG_HS_OC_PIN               1
3265 #define RTE_OTG_HS_OC_ACTIVE            0
3266 #define RTE_OTG_HS_OC_PORT              GPIO_PORT(5)
3267 #define RTE_OTG_HS_OC_BIT               12
3268 //   </e>
3269
3270 //   <o.0> DMA
3271 //     <i> Use dedicated DMA for transfers
3272 //     <i> If DMA is used all USB transfer data buffers have to be 4-byte aligned.
3273 #define RTE_OTG_HS_DMA                  0
3274
3275 // </e>
3276
3277
3278 #endif  /* __RTE_DEVICE_H */