Go to the documentation of this file.
28 #ifndef __RTE_DEVICE_H
29 #define __RTE_DEVICE_H
35 #define RTE_USB_USB0 0
40 #define RTE_USB_PPWR_ID 1
41 #if (RTE_USB_PPWR_ID == 0)
42 #define RTE_USB_PPWR_PIN_EN 0
43 #elif (RTE_USB_PPWR_ID == 1)
44 #define RTE_USB_PPWR_PIN_EN 1
46 #error "Invalid RTE_USB_PPWR Pin Configuration!"
51 #define RTE_USB_PWRD_ID 1
52 #if (RTE_USB_PWRD_ID == 0)
53 #define RTE_USB_PWRD_PIN_EN 0
54 #elif (RTE_USB_PWRD_ID == 1)
55 #define RTE_USB_PWRD_PIN_EN 1
57 #error "Invalid RTE_USB_PWRD Pin Configuration!"
64 #define RTE_USB_OVRCR_ID 0
65 #if (RTE_USB_OVRCR_ID == 0)
66 #define RTE_USB_OVRCR_PIN_EN 0
67 #elif (RTE_USB_OVRCR_ID == 1)
68 #define RTE_USB_OVRCR_PIN_EN 1
70 #error "Invalid RTE_USB_OVRCR Pin Configuration!"
75 #define RTE_USB_CONNECT_ID 1
76 #if (RTE_USB_CONNECT_ID == 0)
77 #define RTE_USB_CONNECT_PIN_EN 0
78 #elif (RTE_USB_CONNECT_ID == 1)
79 #define RTE_USB_CONNECT_PIN_EN 1
81 #error "Invalid RTE_USB_CONNECT Pin Configuration!"
87 #define RTE_USB_VBUS_ID 1
88 #if (RTE_USB_VBUS_ID == 0)
89 #define RTE_USB_VBUS_PIN_EN 0
90 #elif (RTE_USB_VBUS_ID == 1)
91 #define RTE_USB_VBUS_PIN_EN 1
93 #error "Invalid RTE_USB_VBUS Pin Configuration!"
98 #define RTE_USB_UP_LED_ID 1
99 #if (RTE_USB_UP_LED_ID == 0)
100 #define RTE_USB_UP_LED_PIN_EN 0
101 #elif (RTE_USB_UP_LED_ID == 1)
102 #define RTE_USB_UP_LED_PIN_EN 1
104 #error "Invalid RTE_USB_UP_LED Pin Configuration!"
117 #define RTE_ENET_RMII 1
120 #define RTE_ENET_RMII_TXD0_PORT_ID 0
121 #if (RTE_ENET_RMII_TXD0_PORT_ID == 0)
122 #define RTE_ENET_RMII_TXD0_PORT 1
123 #define RTE_ENET_RMII_TXD0_PIN 0
124 #define RTE_ENET_RMII_TXD0_FUNC 1
126 #error "Invalid ENET_TXD0 Pin Configuration!"
129 #define RTE_ENET_RMII_TXD1_PORT_ID 0
130 #if (RTE_ENET_RMII_TXD1_PORT_ID == 0)
131 #define RTE_ENET_RMII_TXD1_PORT 1
132 #define RTE_ENET_RMII_TXD1_PIN 1
133 #define RTE_ENET_RMII_TXD1_FUNC 1
135 #error "Invalid ENET_TXD1 Pin Configuration!"
138 #define RTE_ENET_RMII_REF_CLK_PORT_ID 0
139 #if (RTE_ENET_RMII_REF_CLK_PORT_ID == 0)
140 #define RTE_ENET_RMII_REF_CLK_PORT 1
141 #define RTE_ENET_RMII_REF_CLK_PIN 15
142 #define RTE_ENET_RMII_REF_CLK_FUNC 1
144 #error "Invalid ENET_REF_CLK Pin Configuration!"
147 #define RTE_ENET_RMII_TX_EN_PORT_ID 0
148 #if (RTE_ENET_RMII_TX_EN_PORT_ID == 0)
149 #define RTE_ENET_RMII_TX_EN_PORT 1
150 #define RTE_ENET_RMII_TX_EN_PIN 4
151 #define RTE_ENET_RMII_TX_EN_FUNC 1
153 #error "Invalid ENET_TX_EN Pin Configuration!"
156 #define RTE_ENET_RMII_CRS_PORT_ID 0
157 #if (RTE_ENET_RMII_CRS_PORT_ID == 0)
158 #define RTE_ENET_RMII_CRS_PORT 1
159 #define RTE_ENET_RMII_CRS_PIN 8
160 #define RTE_ENET_RMII_CRS_FUNC 1
162 #error "Invalid ENET_CRS Pin Configuration!"
165 #define RTE_ENET_RMII_RXD0_PORT_ID 0
166 #if (RTE_ENET_RMII_RXD0_PORT_ID == 0)
167 #define RTE_ENET_RMII_RXD0_PORT 1
168 #define RTE_ENET_RMII_RXD0_PIN 9
169 #define RTE_ENET_RMII_RXD0_FUNC 1
171 #error "Invalid ENET_RXD0 Pin Configuration!"
174 #define RTE_ENET_RMII_RXD1_PORT_ID 0
175 #if (RTE_ENET_RMII_RXD1_PORT_ID == 0)
176 #define RTE_ENET_RMII_RXD1_PORT 1
177 #define RTE_ENET_RMII_RXD1_PIN 10
178 #define RTE_ENET_RMII_RXD1_FUNC 1
180 #error "Invalid ENET_RXD1 Pin Configuration!"
183 #define RTE_ENET_RMII_RX_ER_PORT_ID 0
184 #if (RTE_ENET_RMII_RX_ER_PORT_ID == 0)
185 #define RTE_ENET_RMII_RX_ER_PORT 1
186 #define RTE_ENET_RMII_RX_ER_PIN 14
187 #define RTE_ENET_RMII_RX_ER_FUNC 1
189 #error "Invalid ENET_REF_CLK Pin Configuration!"
195 #define RTE_ENET_MDI_MDC_PORT_ID 0
196 #if (RTE_ENET_MDI_MDC_PORT_ID == 0)
197 #define RTE_ENET_MDI_MDC_PORT 1
198 #define RTE_ENET_MDI_MDC_PIN 16
199 #define RTE_ENET_MDI_MDC_FUNC 1
200 #elif (RTE_ENET_MDI_MDC_PORT_ID == 1)
201 #define RTE_ENET_MDI_MDC_PORT 2
202 #define RTE_ENET_MDI_MDC_PIN 8
203 #define RTE_ENET_MDI_MDC_FUNC 3
205 #error "Invalid ENET_MDC Pin Configuration!"
208 #define RTE_ENET_MDI_MDIO_PORT_ID 0
209 #if (RTE_ENET_MDI_MDIO_PORT_ID == 0)
210 #define RTE_ENET_MDI_MDIO_PORT 1
211 #define RTE_ENET_MDI_MDIO_PIN 17
212 #define RTE_ENET_MDI_MDIO_FUNC 1
213 #elif (RTE_ENET_MDI_MDIO_PORT_ID == 1)
214 #define RTE_ENET_MDI_MDIO_PORT 2
215 #define RTE_ENET_MDI_MDIO_PIN 9
216 #define RTE_ENET_MDI_MDIO_FUNC 3
218 #error "Invalid ENET_MDIO Pin Configuration!"
230 #define RTE_I2C0_SCL_PORT_ID 0
231 #if (RTE_I2C0_SCL_PORT_ID == 0)
232 #define RTE_I2C0_SCL_PORT 0
233 #define RTE_I2C0_SCL_PIN 28
234 #define RTE_I2C0_SCL_FUNC 1
236 #error "Invalid I2C0_SCL Pin Configuration!"
240 #define RTE_I2C0_SDA_PORT_ID 0
241 #if (RTE_I2C0_SDA_PORT_ID == 0)
242 #define RTE_I2C0_SDA_PORT 0
243 #define RTE_I2C0_SDA_PIN 27
244 #define RTE_I2C0_SDA_FUNC 1
246 #error "Invalid I2C0_SDA Pin Configuration!"
257 #define RTE_I2C1_SCL_PORT_ID 0
258 #if (RTE_I2C1_SCL_PORT_ID == 0)
259 #define RTE_I2C1_SCL_PORT 0
260 #define RTE_I2C1_SCL_PIN 1
261 #define RTE_I2C1_SCL_FUNC 3
262 #elif (RTE_I2C1_SCL_PORT_ID == 1)
263 #define RTE_I2C1_SCL_PORT 0
264 #define RTE_I2C1_SCL_PIN 20
265 #define RTE_I2C1_SCL_FUNC 3
267 #error "Invalid I2C1_SCL Pin Configuration!"
271 #define RTE_I2C1_SDA_PORT_ID 0
272 #if (RTE_I2C1_SDA_PORT_ID == 0)
273 #define RTE_I2C1_SDA_PORT 0
274 #define RTE_I2C1_SDA_PIN 0
275 #define RTE_I2C1_SDA_FUNC 3
276 #elif (RTE_I2C1_SDA_PORT_ID == 1)
277 #define RTE_I2C1_SDA_PORT 0
278 #define RTE_I2C1_SDA_PIN 19
279 #define RTE_I2C1_SDA_FUNC 3
281 #error "Invalid I2C1_SDA Pin Configuration!"
292 #define RTE_I2C2_SCL_PORT_ID 0
293 #if (RTE_I2C2_SCL_PORT_ID == 0)
294 #define RTE_I2C2_SCL_PORT 0
295 #define RTE_I2C2_SCL_PIN 11
296 #define RTE_I2C2_SCL_FUNC 2
298 #error "Invalid I2C2_SCL Pin Configuration!"
302 #define RTE_I2C2_SDA_PORT_ID 0
303 #if (RTE_I2C2_SDA_PORT_ID == 0)
304 #define RTE_I2C2_SDA_PORT 0
305 #define RTE_I2C2_SDA_PIN 10
306 #define RTE_I2C2_SDA_FUNC 2
308 #error "Invalid I2C2_SDA Pin Configuration!"
318 #define RTE_UART0_TX_ID 0
319 #if (RTE_UART0_TX_ID == 0)
320 #define RTE_UART0_TX_PIN_EN 0
321 #elif (RTE_UART0_TX_ID == 1)
322 #define RTE_UART0_TX_PORT 0
323 #define RTE_UART0_TX_BIT 2
324 #define RTE_UART0_TX_FUNC 1
326 #error "Invalid UART0_TX Pin Configuration!"
328 #ifndef RTE_UART0_TX_PIN_EN
329 #define RTE_UART0_TX_PIN_EN 1
334 #define RTE_UART0_RX_ID 0
335 #if (RTE_UART0_RX_ID == 0)
336 #define RTE_UART0_RX_PIN_EN 0
337 #elif (RTE_UART0_RX_ID == 1)
338 #define RTE_UART0_RX_PORT 0
339 #define RTE_UART0_RX_BIT 3
340 #define RTE_UART0_RX_FUNC 1
342 #error "Invalid UART0_RX Pin Configuration!"
344 #ifndef RTE_UART0_RX_PIN_EN
345 #define RTE_UART0_RX_PIN_EN 1
352 #define RTE_UART0_DMA_TX_EN 1
353 #define RTE_UART0_DMA_TX_CH 0
357 #define RTE_UART0_DMA_RX_EN 1
358 #define RTE_UART0_DMA_RX_CH 1
367 #define RTE_UART1_TX_ID 1
368 #if (RTE_UART1_TX_ID == 0)
369 #define RTE_UART1_TX_PIN_EN 0
370 #elif (RTE_UART1_TX_ID == 1)
371 #define RTE_UART1_TX_PORT 0
372 #define RTE_UART1_TX_BIT 15
373 #define RTE_UART1_TX_FUNC 1
374 #elif (RTE_UART1_TX_ID == 2)
375 #define RTE_UART1_TX_PORT 2
376 #define RTE_UART1_TX_BIT 0
377 #define RTE_UART1_TX_FUNC 2
379 #error "Invalid U1_TX Pin Configuration!"
381 #ifndef RTE_UART1_TX_PIN_EN
382 #define RTE_UART1_TX_PIN_EN 1
387 #define RTE_UART1_RX_ID 1
388 #if (RTE_UART1_RX_ID == 0)
389 #define RTE_UART1_RX_PIN_EN 0
390 #elif (RTE_UART1_RX_ID == 1)
391 #define RTE_UART1_RX_PORT 0
392 #define RTE_UART1_RX_BIT 16
393 #define RTE_UART1_RX_FUNC 1
394 #elif (RTE_UART1_RX_ID == 2)
395 #define RTE_UART1_RX_PORT 2
396 #define RTE_UART1_RX_BIT 1
397 #define RTE_UART1_RX_FUNC 2
399 #error "Invalid U1_RX Pin Configuration!"
401 #ifndef RTE_UART1_RX_PIN_EN
402 #define RTE_UART1_RX_PIN_EN 1
407 #define RTE_UART1_CTS_ID 0
408 #if (RTE_UART1_CTS_ID == 0)
409 #define RTE_UART1_CTS_PIN_EN 0
410 #elif (RTE_UART1_CTS_ID == 1)
411 #define RTE_UART1_CTS_PORT 0
412 #define RTE_UART1_CTS_BIT 17
413 #define RTE_UART1_CTS_FUNC 1
414 #elif (RTE_UART1_CTS_ID == 2)
415 #define RTE_UART1_CTS_PORT 2
416 #define RTE_UART1_CTS_BIT 2
417 #define RTE_UART1_CTS_FUNC 2
419 #error "Invalid U1_CTS Pin Configuration!"
421 #ifndef RTE_UART1_CTS_PIN_EN
422 #define RTE_UART1_CTS_PIN_EN 1
427 #define RTE_UART1_DCD_ID 0
428 #if (RTE_UART1_DCD_ID == 0)
429 #define RTE_UART1_DCD_PIN_EN 0
430 #elif (RTE_UART1_DCD_ID == 1)
431 #define RTE_UART1_DCD_PORT 0
432 #define RTE_UART1_DCD_BIT 18
433 #define RTE_UART1_DCD_FUNC 1
434 #elif (RTE_UART1_DCD_ID == 2)
435 #define RTE_UART1_DCD_PORT 2
436 #define RTE_UART1_DCD_BIT 3
437 #define RTE_UART1_DCD_FUNC 2
439 #error "Invalid UART1_DCD Pin Configuration!"
441 #ifndef RTE_UART1_DCD_PIN_EN
442 #define RTE_UART1_DCD_PIN_EN 1
446 #define RTE_UART1_DSR_ID 0
447 #if (RTE_UART1_DSR_ID == 0)
448 #define RTE_UART1_DSR_PIN_EN 0
449 #elif (RTE_UART1_DSR_ID == 1)
450 #define RTE_UART1_DSR_PORT 0
451 #define RTE_UART1_DSR_BIT 19
452 #define RTE_UART1_DSR_FUNC 1
453 #elif (RTE_UART1_DSR_ID == 2)
454 #define RTE_UART1_DSR_PORT 2
455 #define RTE_UART1_DSR_BIT 4
456 #define RTE_UART1_DSR_FUNC 2
458 #error "Invalid UART1_DSR Pin Configuration!"
460 #ifndef RTE_UART1_DSR_PIN_EN
461 #define RTE_UART1_DSR_PIN_EN 1
465 #define RTE_UART1_DTR_ID 0
466 #if (RTE_UART1_DTR_ID == 0)
467 #define RTE_UART1_DTR_PIN_EN 0
468 #elif (RTE_UART1_DTR_ID == 1)
469 #define RTE_UART1_DTR_PORT 0
470 #define RTE_UART1_DTR_BIT 20
471 #define RTE_UART1_DTR_FUNC 1
472 #elif (RTE_UART1_DTR_ID == 2)
473 #define RTE_UART1_DTR_PORT 2
474 #define RTE_UART1_DTR_BIT 5
475 #define RTE_UART1_DTR_FUNC 2
477 #error "Invalid UART1_DTR Pin Configuration!"
479 #ifndef RTE_UART1_DTR_PIN_EN
480 #define RTE_UART1_DTR_PIN_EN 1
484 #define RTE_UART1_RI_ID 0
485 #if (RTE_UART1_RI_ID == 0)
486 #define RTE_UART1_RI_PIN_EN 0
487 #elif (RTE_UART1_RI_ID == 1)
488 #define RTE_UART1_RI_PORT 0
489 #define RTE_UART1_RI_BIT 21
490 #define RTE_UART1_RI_FUNC 1
491 #elif (RTE_UART1_RI_ID == 2)
492 #define RTE_UART1_RI_PORT 2
493 #define RTE_UART1_RI_BIT 6
494 #define RTE_UART1_RI_FUNC 2
496 #error "Invalid UART1_RI Pin Configuration!"
498 #ifndef RTE_UART1_RI_PIN_EN
499 #define RTE_UART1_RI_PIN_EN 1
503 #define RTE_UART1_RTS_ID 0
504 #if (RTE_UART1_RTS_ID == 0)
505 #define RTE_UART1_RTS_PIN_EN 0
506 #elif (RTE_UART1_RTS_ID == 1)
507 #define RTE_UART1_RTS_PORT 0
508 #define RTE_UART1_RTS_BIT 22
509 #define RTE_UART1_RTS_FUNC 1
510 #elif (RTE_UART1_RTS_ID == 2)
511 #define RTE_UART1_RTS_PORT 2
512 #define RTE_UART1_RTS_BIT 7
513 #define RTE_UART1_RTS_FUNC 2
515 #error "Invalid UART1_RTS Pin Configuration!"
517 #ifndef RTE_UART1_RTS_PIN_EN
518 #define RTE_UART1_RTS_PIN_EN 1
527 #define RTE_UART1_DMA_TX_EN 1
528 #define RTE_UART1_DMA_TX_CH 0
532 #define RTE_UART1_DMA_RX_EN 1
533 #define RTE_UART1_DMA_RX_CH 1
543 #define RTE_UART2_TX_ID 0
544 #if (RTE_UART2_TX_ID == 0)
545 #define RTE_UART2_TX_PIN_EN 0
546 #elif (RTE_UART2_TX_ID == 1)
547 #define RTE_UART2_TX_PORT 0
548 #define RTE_UART2_TX_BIT 10
549 #define RTE_UART2_TX_FUNC 1
550 #elif (RTE_UART2_TX_ID == 2)
551 #define RTE_UART2_TX_PORT 2
552 #define RTE_UART2_TX_BIT 8
553 #define RTE_UART2_TX_FUNC 2
555 #error "Invalid UART2_TX Pin Configuration!"
557 #ifndef RTE_UART2_TX_PIN_EN
558 #define RTE_UART2_TX_PIN_EN 1
563 #define RTE_UART2_RX_ID 0
564 #if (RTE_UART2_RX_ID == 0)
565 #define RTE_UART2_RX_PIN_EN 0
566 #elif (RTE_UART2_RX_ID == 1)
567 #define RTE_UART2_RX_PORT 0
568 #define RTE_UART2_RX_BIT 11
569 #define RTE_UART2_RX_FUNC 1
570 #elif (RTE_UART2_RX_ID == 2)
571 #define RTE_UART2_RX_PORT 2
572 #define RTE_UART2_RX_BIT 9
573 #define RTE_UART2_RX_FUNC 2
575 #error "Invalid UART2_RX Pin Configuration!"
577 #ifndef RTE_UART2_RX_PIN_EN
578 #define RTE_UART2_RX_PIN_EN 1
585 #define RTE_UART2_DMA_TX_EN 1
586 #define RTE_UART2_DMA_TX_CH 0
590 #define RTE_UART2_DMA_RX_EN 1
591 #define RTE_UART2_DMA_RX_CH 1
601 #define RTE_UART3_TX_ID 0
602 #if (RTE_UART3_TX_ID == 0)
603 #define RTE_UART3_TX_PIN_EN 0
604 #elif (RTE_UART3_TX_ID == 1)
605 #define RTE_UART3_TX_PORT 0
606 #define RTE_UART3_TX_BIT 0
607 #define RTE_UART3_TX_FUNC 2
608 #elif (RTE_UART3_TX_ID == 2)
609 #define RTE_UART3_TX_PORT 0
610 #define RTE_UART3_TX_BIT 25
611 #define RTE_UART3_TX_FUNC 3
612 #elif (RTE_UART3_TX_ID == 3)
613 #define RTE_UART3_TX_PORT 4
614 #define RTE_UART3_TX_BIT 28
615 #define RTE_UART3_TX_FUNC 3
617 #error "Invalid UART3_TX Pin Configuration!"
619 #ifndef RTE_UART3_TX_PIN_EN
620 #define RTE_UART3_TX_PIN_EN 1
625 #define RTE_UART3_RX_ID 0
626 #if (RTE_UART3_RX_ID == 0)
627 #define RTE_UART3_RX_PIN_EN 0
628 #elif (RTE_UART3_RX_ID == 1)
629 #define RTE_UART3_RX_PORT 0
630 #define RTE_UART3_RX_BIT 1
631 #define RTE_UART3_RX_FUNC 2
632 #elif (RTE_UART3_RX_ID == 2)
633 #define RTE_UART3_RX_PORT 0
634 #define RTE_UART3_RX_BIT 26
635 #define RTE_UART3_RX_FUNC 3
636 #elif (RTE_UART3_RX_ID == 3)
637 #define RTE_UART3_RX_PORT 4
638 #define RTE_UART3_RX_BIT 29
639 #define RTE_UART3_RX_FUNC 3
641 #error "Invalid UART3_RX Pin Configuration!"
643 #ifndef RTE_UART3_RX_PIN_EN
644 #define RTE_UART3_RX_PIN_EN 1
651 #define RTE_UART3_DMA_TX_EN 1
652 #define RTE_UART3_DMA_TX_CH 0
656 #define RTE_UART3_DMA_RX_EN 1
657 #define RTE_UART3_DMA_RX_CH 1
664 #define RTE_CAN_CAN1 0
669 #define RTE_CAN1_RD_ID 0
670 #if (RTE_CAN1_RD_ID == 0)
671 #define RTE_CAN1_RD_PIN_EN 0
672 #elif (RTE_CAN1_RD_ID == 1)
673 #define RTE_CAN1_RD_PORT 0
674 #define RTE_CAN1_RD_BIT 0
675 #define RTE_CAN1_RD_FUNC 1
676 #elif (RTE_CAN1_RD_ID == 2)
677 #define RTE_CAN1_RD_PORT 0
678 #define RTE_CAN1_RD_BIT 21
679 #define RTE_CAN1_RD_FUNC 3
681 #error "Invalid RTE_CAN1_RD Pin Configuration!"
683 #ifndef RTE_CAN1_RD_PIN_EN
684 #define RTE_CAN1_RD_PIN_EN 1
688 #define RTE_CAN1_TD_ID 0
689 #if (RTE_CAN1_TD_ID == 0)
690 #define RTE_CAN1_TD_PIN_EN 0
691 #elif (RTE_CAN1_TD_ID == 1)
692 #define RTE_CAN1_TD_PORT 0
693 #define RTE_CAN1_TD_BIT 1
694 #define RTE_CAN1_TD_FUNC 1
695 #elif (RTE_CAN1_TD_ID == 2)
696 #define RTE_CAN1_TD_PORT 0
697 #define RTE_CAN1_TD_BIT 22
698 #define RTE_CAN1_TD_FUNC 3
700 #error "Invalid RTE_CAN1_TD Pin Configuration!"
702 #ifndef RTE_CAN1_TD_PIN_EN
703 #define RTE_CAN1_TD_PIN_EN 1
710 #define RTE_CAN_CAN2 1
715 #define RTE_CAN2_RD_ID 0
716 #if (RTE_CAN2_RD_ID == 0)
717 #define RTE_CAN2_RD_PIN_EN 0
718 #elif (RTE_CAN2_RD_ID == 1)
719 #define RTE_CAN2_RD_PORT 0
720 #define RTE_CAN2_RD_BIT 4
721 #define RTE_CAN2_RD_FUNC 2
722 #elif (RTE_CAN2_RD_ID == 2)
723 #define RTE_CAN2_RD_PORT 2
724 #define RTE_CAN2_RD_BIT 7
725 #define RTE_CAN2_RD_FUNC 1
727 #error "Invalid RTE_CAN2_RD Pin Configuration!"
729 #ifndef RTE_CAN2_RD_PIN_EN
730 #define RTE_CAN2_RD_PIN_EN 1
734 #define RTE_CAN2_TD_ID 0
735 #if (RTE_CAN2_TD_ID == 0)
736 #define RTE_CAN2_TD_PIN_EN 0
737 #elif (RTE_CAN2_TD_ID == 1)
738 #define RTE_CAN2_TD_PORT 0
739 #define RTE_CAN2_TD_BIT 5
740 #define RTE_CAN2_TD_FUNC 2
741 #elif (RTE_CAN2_TD_ID == 2)
742 #define RTE_CAN2_TD_PORT 2
743 #define RTE_CAN2_TD_BIT 8
744 #define RTE_CAN2_TD_FUNC 1
746 #error "Invalid RTE_CAN2_TD Pin Configuration!"
748 #ifndef RTE_CAN2_TD_PIN_EN
749 #define RTE_CAN2_TD_PIN_EN 1
762 #define RTE_SSP0_SSEL_PIN_SEL 1
763 #if (RTE_SSP0_SSEL_PIN_SEL == 0)
764 #define RTE_SSP0_SSEL_PIN_EN 0
765 #elif (RTE_SSP0_SSEL_PIN_SEL == 1)
766 #define RTE_SSP0_SSEL_PORT 0
767 #define RTE_SSP0_SSEL_BIT 16
768 #define RTE_SSP0_SSEL_FUNC 2
769 #elif (RTE_SSP0_SSEL_PIN_SEL == 2)
770 #define RTE_SSP0_SSEL_PORT 1
771 #define RTE_SSP0_SSEL_BIT 21
772 #define RTE_SSP0_SSEL_FUNC 3
774 #error "Invalid SSP0 SSP0_SSEL Pin Configuration!"
776 #ifndef RTE_SSP0_SSEL_PIN_EN
777 #define RTE_SSP0_SSEL_PIN_EN 1
782 #define RTE_SSP0_SCK_PIN_SEL 0
783 #if (RTE_SSP0_SCK_PIN_SEL == 0)
784 #define RTE_SSP0_SCK_PORT 0
785 #define RTE_SSP0_SCK_BIT 15
786 #define RTE_SSP0_SCK_FUNC 2
787 #elif (RTE_SSP0_SCK_PIN_SEL == 1)
788 #define RTE_SSP0_SCK_PORT 1
789 #define RTE_SSP0_SCK_BIT 20
790 #define RTE_SSP0_SCK_FUNC 3
792 #error "Invalid SSP0 SSP0_SCK Pin Configuration!"
797 #define RTE_SSP0_MISO_PIN_SEL 1
798 #if (RTE_SSP0_MISO_PIN_SEL == 0)
799 #define RTE_SSP0_MISO_PIN_EN 0
800 #elif (RTE_SSP0_MISO_PIN_SEL == 1)
801 #define RTE_SSP0_MISO_PORT 0
802 #define RTE_SSP0_MISO_BIT 17
803 #define RTE_SSP0_MISO_FUNC 2
804 #elif (RTE_SSP0_MISO_PIN_SEL == 2)
805 #define RTE_SSP0_MISO_PORT 1
806 #define RTE_SSP0_MISO_BIT 23
807 #define RTE_SSP0_MISO_FUNC 3
809 #error "Invalid SSP0 SSP0_MISO Pin Configuration!"
811 #ifndef RTE_SSP0_MISO_PIN_EN
812 #define RTE_SSP0_MISO_PIN_EN 1
817 #define RTE_SSP0_MOSI_PIN_SEL 1
818 #if (RTE_SSP0_MOSI_PIN_SEL == 0)
819 #define RTE_SSP0_MOSI_PIN_EN 0
820 #elif (RTE_SSP0_MOSI_PIN_SEL == 1)
821 #define RTE_SSP0_MOSI_PORT 0
822 #define RTE_SSP0_MOSI_BIT 18
823 #define RTE_SSP0_MOSI_FUNC 2
824 #elif (RTE_SSP0_MOSI_PIN_SEL == 2)
825 #define RTE_SSP0_MOSI_PORT 1
826 #define RTE_SSP0_MOSI_BIT 24
827 #define RTE_SSP0_MOSI_FUNC 3
829 #error "Invalid SSP0 SSP0_MOSI Pin Configuration!"
831 #ifndef RTE_SSP0_MOSI_PIN_EN
832 #define RTE_SSP0_MOSI_PIN_EN 1
840 #define RTE_SSP0_DMA_TX_EN 0
841 #define RTE_SSP0_DMA_TX_CH 0
845 #define RTE_SSP0_DMA_RX_EN 0
846 #define RTE_SSP0_DMA_RX_CH 1
857 #define RTE_SSP1_SSEL_PIN_SEL 1
858 #if (RTE_SSP1_SSEL_PIN_SEL == 0)
859 #define RTE_SSP1_SSEL_PIN_EN 0
860 #elif (RTE_SSP1_SSEL_PIN_SEL == 1)
861 #define RTE_SSP1_SSEL_PORT 0
862 #define RTE_SSP1_SSEL_BIT 6
863 #define RTE_SSP1_SSEL_FUNC 2
865 #error "Invalid SSP1 SSP1_SSEL Pin Configuration!"
867 #ifndef RTE_SSP1_SSEL_PIN_EN
868 #define RTE_SSP1_SSEL_PIN_EN 1
873 #define RTE_SSP1_SCK_PIN_SEL 0
874 #if (RTE_SSP1_SCK_PIN_SEL == 0)
875 #define RTE_SSP1_SCK_PORT 0
876 #define RTE_SSP1_SCK_BIT 7
877 #define RTE_SSP1_SCK_FUNC 2
878 #elif (RTE_SSP1_SCK_PIN_SEL == 1)
879 #define RTE_SSP1_SCK_PORT 1
880 #define RTE_SSP1_SCK_BIT 31
881 #define RTE_SSP1_SCK_FUNC 2
883 #error "Invalid SSP1 SSP1_SCK Pin Configuration!"
888 #define RTE_SSP1_MISO_PIN_SEL 1
889 #if (RTE_SSP1_MISO_PIN_SEL == 0)
890 #define RTE_SSP1_MISO_PIN_EN 0
891 #elif (RTE_SSP1_MISO_PIN_SEL == 1)
892 #define RTE_SSP1_MISO_PORT 0
893 #define RTE_SSP1_MISO_BIT 8
894 #define RTE_SSP1_MISO_FUNC 2
896 #error "Invalid SSP1 SSP1_MISO Pin Configuration!"
898 #ifndef RTE_SSP1_MISO_PIN_EN
899 #define RTE_SSP1_MISO_PIN_EN 1
904 #define RTE_SSP1_MOSI_PIN_SEL 1
905 #if (RTE_SSP1_MOSI_PIN_SEL == 0)
906 #define RTE_SSP1_MOSI_PIN_EN 0
907 #elif (RTE_SSP1_MOSI_PIN_SEL == 1)
908 #define RTE_SSP1_MOSI_PORT 0
909 #define RTE_SSP1_MOSI_BIT 9
910 #define RTE_SSP1_MOSI_FUNC 2
912 #error "Invalid SSP1 SSP1_MOSI Pin Configuration!"
914 #ifndef RTE_SSP1_MOSI_PIN_EN
915 #define RTE_SSP1_MOSI_PIN_EN 1
923 #define RTE_SSP1_DMA_TX_EN 0
924 #define RTE_SSP1_DMA_TX_CH 2
928 #define RTE_SSP1_DMA_RX_EN 0
929 #define RTE_SSP1_DMA_RX_CH 3
941 #define RTE_SPI_SSEL_PIN_SEL 1
942 #if (RTE_SPI_SSEL_PIN_SEL == 0)
943 #define RTE_SPI_SSEL_PIN_EN 0
944 #elif (RTE_SPI_SSEL_PIN_SEL == 1)
945 #define RTE_SPI_SSEL_PORT 0
946 #define RTE_SPI_SSEL_BIT 16
947 #define RTE_SPI_SSEL_FUNC 3
949 #error "Invalid SPI SPI_SSEL Pin Configuration!"
951 #ifndef RTE_SPI_SSEL_PIN_EN
952 #define RTE_SPI_SSEL_PIN_EN 1
956 #define RTE_SPI_SCK_PIN_SEL 0
957 #if (RTE_SPI_SCK_PIN_SEL == 0)
958 #define RTE_SPI_SCK_PORT 0
959 #define RTE_SPI_SCK_BIT 15
960 #define RTE_SPI_SCK_FUNC 3
962 #error "Invalid SPI SPI_SCK Pin Configuration!"
966 #define RTE_SPI_MISO_PIN_SEL 1
967 #if (RTE_SPI_MISO_PIN_SEL == 0)
968 #define RTE_SPI_MISO_PIN_EN 0
969 #elif (RTE_SPI_MISO_PIN_SEL == 1)
970 #define RTE_SPI_MISO_PORT 0
971 #define RTE_SPI_MISO_BIT 17
972 #define RTE_SPI_MISO_FUNC 3
974 #error "Invalid SPI SPI_MISO Pin Configuration!"
976 #ifndef RTE_SPI_MISO_PIN_EN
977 #define RTE_SPI_MISO_PIN_EN 1
982 #define RTE_SPI_MOSI_PIN_SEL 1
983 #if (RTE_SPI_MOSI_PIN_SEL == 0)
984 #define RTE_SPI_MOSI_PIN_EN 0
985 #elif (RTE_SPI_MOSI_PIN_SEL == 1)
986 #define RTE_SPI_MOSI_PORT 0
987 #define RTE_SPI_MOSI_BIT 18
988 #define RTE_SPI_MOSI_FUNC 3
990 #error "Invalid SPI SPI_MOSI Pin Configuration!"
992 #ifndef RTE_SPI_MOSI_PIN_EN
993 #define RTE_SPI_MOSI_PIN_EN 1
1007 #define RTE_I2S0_RX_SCK_PIN_SEL 1
1008 #if (RTE_I2S0_RX_SCK_PIN_SEL == 0)
1009 #define RTE_I2S0_RX_SCK_PIN_EN 0
1010 #elif (RTE_I2S0_RX_SCK_PIN_SEL == 1)
1011 #define RTE_I2S0_RX_SCK_PORT 0
1012 #define RTE_I2S0_RX_SCK_BIT 4
1013 #define RTE_I2S0_RX_SCK_FUNC 1
1014 #elif (RTE_I2S0_RX_SCK_PIN_SEL == 2)
1015 #define RTE_I2S0_RX_SCK_PORT 0
1016 #define RTE_I2S0_RX_SCK_BIT 23
1017 #define RTE_I2S0_RX_SCK_FUNC 2
1019 #error "Invalid I2S0 I2S0_RX_SCK Pin Configuration!"
1021 #ifndef RTE_I2S0_RX_SCK_PIN_EN
1022 #define RTE_I2S0_RX_SCK_PIN_EN 1
1026 #define RTE_I2S0_RX_WS_PIN_SEL 1
1027 #if (RTE_I2S0_RX_WS_PIN_SEL == 0)
1028 #define RTE_I2S0_RX_WS_PIN_EN 0
1029 #elif (RTE_I2S0_RX_WS_PIN_SEL == 1)
1030 #define RTE_I2S0_RX_WS_PORT 0
1031 #define RTE_I2S0_RX_WS_BIT 5
1032 #define RTE_I2S0_RX_WS_FUNC 1
1033 #elif (RTE_I2S0_RX_WS_PIN_SEL == 2)
1034 #define RTE_I2S0_RX_WS_PORT 0
1035 #define RTE_I2S0_RX_WS_BIT 24
1036 #define RTE_I2S0_RX_WS_FUNC 2
1038 #error "Invalid I2S0 I2S0_RX_WS Pin Configuration!"
1040 #ifndef RTE_I2S0_RX_WS_PIN_EN
1041 #define RTE_I2S0_RX_WS_PIN_EN 1
1045 #define RTE_I2S0_RX_SDA_PIN_SEL 1
1046 #if (RTE_I2S0_RX_SDA_PIN_SEL == 0)
1047 #define RTE_I2S0_RX_SDA_PIN_EN 0
1048 #elif (RTE_I2S0_RX_SDA_PIN_SEL == 1)
1049 #define RTE_I2S0_RX_SDA_PORT 0
1050 #define RTE_I2S0_RX_SDA_BIT 6
1051 #define RTE_I2S0_RX_SDA_FUNC 1
1052 #elif (RTE_I2S0_RX_SDA_PIN_SEL == 2)
1053 #define RTE_I2S0_RX_SDA_PORT 0
1054 #define RTE_I2S0_RX_SDA_BIT 25
1055 #define RTE_I2S0_RX_SDA_FUNC 2
1057 #error "Invalid I2S0 I2S0_RX_SDA Pin Configuration!"
1059 #ifndef RTE_I2S0_RX_SDA_PIN_EN
1060 #define RTE_I2S0_RX_SDA_PIN_EN 1
1064 #define RTE_I2S0_RX_MCLK_PIN_SEL 0
1065 #if (RTE_I2S0_RX_MCLK_PIN_SEL == 0)
1066 #define RTE_I2S0_RX_MCLK_PIN_EN 0
1067 #elif (RTE_I2S0_RX_MCLK_PIN_SEL == 1)
1068 #define RTE_I2S0_RX_MCLK_PORT 4
1069 #define RTE_I2S0_RX_MCLK_BIT 28
1070 #define RTE_I2S0_RX_MCLK_FUNC 1
1072 #error "Invalid I2S0 I2S0_RX_MCLK Pin Configuration!"
1074 #ifndef RTE_I2S0_RX_MCLK_PIN_EN
1075 #define RTE_I2S0_RX_MCLK_PIN_EN 1
1079 #define RTE_I2S0_TX_SCK_PIN_SEL 1
1080 #if (RTE_I2S0_TX_SCK_PIN_SEL == 0)
1081 #define RTE_I2S0_TX_SCK_PIN_EN 0
1082 #elif (RTE_I2S0_TX_SCK_PIN_SEL == 1)
1083 #define RTE_I2S0_TX_SCK_PORT 0
1084 #define RTE_I2S0_TX_SCK_BIT 7
1085 #define RTE_I2S0_TX_SCK_FUNC 1
1086 #elif (RTE_I2S0_TX_SCK_PIN_SEL == 2)
1087 #define RTE_I2S0_TX_SCK_PORT 2
1088 #define RTE_I2S0_TX_SCK_BIT 11
1089 #define RTE_I2S0_TX_SCK_FUNC 3
1091 #error "Invalid I2S0 I2S0_TX_SCK Pin Configuration!"
1093 #ifndef RTE_I2S0_TX_SCK_PIN_EN
1094 #define RTE_I2S0_TX_SCK_PIN_EN 1
1098 #define RTE_I2S0_TX_WS_PIN_SEL 1
1099 #if (RTE_I2S0_TX_WS_PIN_SEL == 0)
1100 #define RTE_I2S0_TX_WS_PIN_EN 0
1101 #elif (RTE_I2S0_TX_WS_PIN_SEL == 1)
1102 #define RTE_I2S0_TX_WS_PORT 0
1103 #define RTE_I2S0_TX_WS_BIT 8
1104 #define RTE_I2S0_TX_WS_FUNC 1
1105 #elif (RTE_I2S0_TX_WS_PIN_SEL == 2)
1106 #define RTE_I2S0_TX_WS_PORT 2
1107 #define RTE_I2S0_TX_WS_BIT 12
1108 #define RTE_I2S0_TX_WS_FUNC 3
1110 #error "Invalid I2S0 I2S0_TX_WS Pin Configuration!"
1112 #ifndef RTE_I2S0_TX_WS_PIN_EN
1113 #define RTE_I2S0_TX_WS_PIN_EN 1
1117 #define RTE_I2S0_TX_SDA_PIN_SEL 1
1118 #if (RTE_I2S0_TX_SDA_PIN_SEL == 0)
1119 #define RTE_I2S0_TX_SDA_PIN_EN 0
1120 #elif (RTE_I2S0_TX_SDA_PIN_SEL == 1)
1121 #define RTE_I2S0_TX_SDA_PORT 0
1122 #define RTE_I2S0_TX_SDA_BIT 9
1123 #define RTE_I2S0_TX_SDA_FUNC 1
1124 #elif (RTE_I2S0_TX_SDA_PIN_SEL == 2)
1125 #define RTE_I2S0_TX_SDA_PORT 2
1126 #define RTE_I2S0_TX_SDA_BIT 13
1127 #define RTE_I2S0_TX_SDA_FUNC 3
1129 #error "Invalid I2S0 I2S0_TX_SDA Pin Configuration!"
1131 #ifndef RTE_I2S0_TX_SDA_PIN_EN
1132 #define RTE_I2S0_TX_SDA_PIN_EN 1
1136 #define RTE_I2S0_TX_MCLK_PIN_SEL 1
1137 #if (RTE_I2S0_TX_MCLK_PIN_SEL == 0)
1138 #define RTE_I2S0_TX_MCLK_PIN_EN 0
1139 #elif (RTE_I2S0_TX_MCLK_PIN_SEL == 1)
1140 #define RTE_I2S0_TX_MCLK_PORT 4
1141 #define RTE_I2S0_TX_MCLK_BIT 29
1142 #define RTE_I2S0_TX_MCLK_FUNC 1
1144 #error "Invalid I2S0 I2S0_TX_MCLK Pin Configuration!"
1146 #ifndef RTE_I2S0_TX_MCLK_PIN_EN
1147 #define RTE_I2S0_TX_MCLK_PIN_EN 1
1156 #define RTE_I2S0_DMA_TX_EN 1
1157 #define RTE_I2S0_DMA_TX_CH 0
1162 #define RTE_I2S0_DMA_RX_EN 1
1163 #define RTE_I2S0_DMA_RX_CH 1