summary refs log tree commit diff
path: root/F2024/coe718/labs/lab2/RTE/Device/LPC1768/RTE_Device.h
blob: 81024f285f073be99e71acda74938f7ee39e2de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
/* -------------------------------------------------------------------------- 
 * Copyright (c) 2013-2016 Arm Limited (or its affiliates). All 
 * rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * $Date:        20. April 2016
 * $Revision:    V2.4.1
 *
 * Project:      RTE Device Configuration for NXP LPC17xx
 * -------------------------------------------------------------------------- */

//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------

#ifndef __RTE_DEVICE_H
#define __RTE_DEVICE_H


// <e> USB Controller [Driver_USBD and Driver_USBH]
// <i> Configuration settings for Driver_USBD in component ::Drivers:USB Device
// <i> Configuration settings for Driver_USBH in component ::Drivers:USB Host
#define   RTE_USB_USB0                  0

//   <h> Pin Configuration
//     <o> USB_PPWR (Host) <0=>Not used <1=>P1_19
//     <i> VBUS drive signal (towards external charge pump or power management unit).
#define   RTE_USB_PPWR_ID               1
#if      (RTE_USB_PPWR_ID == 0)
  #define RTE_USB_PPWR_PIN_EN           0
#elif    (RTE_USB_PPWR_ID == 1)
  #define RTE_USB_PPWR_PIN_EN           1
#else
  #error "Invalid RTE_USB_PPWR Pin Configuration!"
#endif

//     <o> USB_PWRD (Host) <0=>Not used <1=>P1_22
//     <i> Power Status for USB port.
#define   RTE_USB_PWRD_ID               1
#if      (RTE_USB_PWRD_ID == 0)
  #define RTE_USB_PWRD_PIN_EN           0
#elif    (RTE_USB_PWRD_ID == 1)
  #define RTE_USB_PWRD_PIN_EN           1
#else
  #error "Invalid RTE_USB_PWRD Pin Configuration!"
#endif

//     <o> USB_OVRCR (Host) <0=>Not used <1=>P1_27
//     <i> Port power fault signal indicating overcurrent condition.
//     <i> This signal monitors over-current on the USB bus
//        (external circuitry required to detect over-current condition).
#define   RTE_USB_OVRCR_ID              0
#if      (RTE_USB_OVRCR_ID == 0)
  #define RTE_USB_OVRCR_PIN_EN          0
#elif    (RTE_USB_OVRCR_ID == 1)
  #define RTE_USB_OVRCR_PIN_EN          1
#else
  #error "Invalid RTE_USB_OVRCR Pin Configuration!"
#endif

//     <o> USB_CONNECT (Device) <0=>Not used <1=>P2_9
//     <i> SoftConnect control signal
#define   RTE_USB_CONNECT_ID            1
#if      (RTE_USB_CONNECT_ID == 0)
  #define RTE_USB_CONNECT_PIN_EN        0
#elif    (RTE_USB_CONNECT_ID == 1)
  #define RTE_USB_CONNECT_PIN_EN        1
#else
  #error "Invalid RTE_USB_CONNECT Pin Configuration!"
#endif

//     <o> USB_VBUS (Device) <0=>Not used <1=>P1_30
//     <i> VBUS status input.
//     <i> When this function is not enabled via its corresponding PINSEL register, it is driven HIGH internally.
#define   RTE_USB_VBUS_ID               1
#if      (RTE_USB_VBUS_ID == 0)
  #define RTE_USB_VBUS_PIN_EN           0
#elif    (RTE_USB_VBUS_ID == 1)
  #define RTE_USB_VBUS_PIN_EN           1
#else
  #error "Invalid RTE_USB_VBUS Pin Configuration!"
#endif

//     <o> USB_UP_LED <0=>Not used <1=>P1_18
//     <i> GoodLink LED control signal.
#define   RTE_USB_UP_LED_ID             1
#if      (RTE_USB_UP_LED_ID == 0)
  #define RTE_USB_UP_LED_PIN_EN         0
#elif    (RTE_USB_UP_LED_ID == 1)
  #define RTE_USB_UP_LED_PIN_EN         1
#else
  #error "Invalid RTE_USB_UP_LED Pin Configuration!"
#endif

//  </h> Pin Configuration
// </e> USB Controller [Driver_USBD and Driver_USBH]


// <e> ENET (Ethernet Interface) [Driver_ETH_MAC0]
// <i> Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC
#define RTE_ENET                        0


//   <h> RMII (Reduced Media Independent Interface)
#define RTE_ENET_RMII                   1

//     <o> ENET_TXD0 Pin <0=>P1_0
#define RTE_ENET_RMII_TXD0_PORT_ID      0
#if    (RTE_ENET_RMII_TXD0_PORT_ID == 0)
#define RTE_ENET_RMII_TXD0_PORT         1
#define RTE_ENET_RMII_TXD0_PIN          0
#define RTE_ENET_RMII_TXD0_FUNC         1
#else
#error "Invalid ENET_TXD0 Pin Configuration!"
#endif
//     <o> ENET_TXD1 Pin <0=>P1_1
#define RTE_ENET_RMII_TXD1_PORT_ID      0
#if    (RTE_ENET_RMII_TXD1_PORT_ID == 0)
#define RTE_ENET_RMII_TXD1_PORT         1
#define RTE_ENET_RMII_TXD1_PIN          1
#define RTE_ENET_RMII_TXD1_FUNC         1
#else
#error "Invalid ENET_TXD1 Pin Configuration!"
#endif
//     <o> ENET_REF_CLK Pin <0=>P1_15
#define RTE_ENET_RMII_REF_CLK_PORT_ID   0
#if    (RTE_ENET_RMII_REF_CLK_PORT_ID == 0)
#define RTE_ENET_RMII_REF_CLK_PORT      1
#define RTE_ENET_RMII_REF_CLK_PIN       15
#define RTE_ENET_RMII_REF_CLK_FUNC      1
#else
#error "Invalid ENET_REF_CLK Pin Configuration!"
#endif
//     <o> ENET_TX_EN Pin <0=>P1_4
#define RTE_ENET_RMII_TX_EN_PORT_ID     0
#if    (RTE_ENET_RMII_TX_EN_PORT_ID == 0)
#define RTE_ENET_RMII_TX_EN_PORT        1
#define RTE_ENET_RMII_TX_EN_PIN         4
#define RTE_ENET_RMII_TX_EN_FUNC        1
#else
#error "Invalid ENET_TX_EN Pin Configuration!"
#endif
//     <o> ENET_CRS Pin <0=>P1_8
#define RTE_ENET_RMII_CRS_PORT_ID       0
#if    (RTE_ENET_RMII_CRS_PORT_ID == 0)
#define RTE_ENET_RMII_CRS_PORT          1
#define RTE_ENET_RMII_CRS_PIN           8
#define RTE_ENET_RMII_CRS_FUNC          1
#else
#error "Invalid ENET_CRS Pin Configuration!"
#endif
//     <o> ENET_RXD0 Pin <0=>P1_9
#define RTE_ENET_RMII_RXD0_PORT_ID      0
#if    (RTE_ENET_RMII_RXD0_PORT_ID == 0)
#define RTE_ENET_RMII_RXD0_PORT         1
#define RTE_ENET_RMII_RXD0_PIN          9
#define RTE_ENET_RMII_RXD0_FUNC         1
#else
#error "Invalid ENET_RXD0 Pin Configuration!"
#endif
//     <o> ENET_RXD1 Pin <0=>P1_10
#define RTE_ENET_RMII_RXD1_PORT_ID      0
#if    (RTE_ENET_RMII_RXD1_PORT_ID == 0)
#define RTE_ENET_RMII_RXD1_PORT         1
#define RTE_ENET_RMII_RXD1_PIN          10
#define RTE_ENET_RMII_RXD1_FUNC         1
#else
#error "Invalid ENET_RXD1 Pin Configuration!"
#endif
//     <o> ENET_RX_ER Pin <0=>P1_14
#define RTE_ENET_RMII_RX_ER_PORT_ID     0
#if    (RTE_ENET_RMII_RX_ER_PORT_ID == 0)
#define RTE_ENET_RMII_RX_ER_PORT        1
#define RTE_ENET_RMII_RX_ER_PIN         14
#define RTE_ENET_RMII_RX_ER_FUNC        1
#else
#error "Invalid ENET_REF_CLK Pin Configuration!"
#endif
//   </h>

//   <h> MIIM (Management Data Interface)
//     <o> ENET_MDC Pin <0=>P1_16 <1=>P2_8
#define RTE_ENET_MDI_MDC_PORT_ID        0
#if    (RTE_ENET_MDI_MDC_PORT_ID == 0)
#define RTE_ENET_MDI_MDC_PORT           1
#define RTE_ENET_MDI_MDC_PIN            16
#define RTE_ENET_MDI_MDC_FUNC           1
#elif  (RTE_ENET_MDI_MDC_PORT_ID == 1)  
#define RTE_ENET_MDI_MDC_PORT           2
#define RTE_ENET_MDI_MDC_PIN            8
#define RTE_ENET_MDI_MDC_FUNC           3
#else
#error "Invalid ENET_MDC Pin Configuration!"
#endif
//     <o> ENET_MDIO Pin <0=>P1_17 <1=>P2_9
#define RTE_ENET_MDI_MDIO_PORT_ID       0
#if    (RTE_ENET_MDI_MDIO_PORT_ID == 0)
#define RTE_ENET_MDI_MDIO_PORT          1
#define RTE_ENET_MDI_MDIO_PIN           17
#define RTE_ENET_MDI_MDIO_FUNC          1
#elif  (RTE_ENET_MDI_MDIO_PORT_ID == 1)
#define RTE_ENET_MDI_MDIO_PORT          2
#define RTE_ENET_MDI_MDIO_PIN           9
#define RTE_ENET_MDI_MDIO_FUNC          3
#else
#error "Invalid ENET_MDIO Pin Configuration!"
#endif
//   </h>

// </e>


// <e> I2C0 (Inter-integrated Circuit Interface 0) [Driver_I2C0]
// <i> Configuration settings for Driver_I2C0 in component ::Drivers:I2C
#define RTE_I2C0                        0

//   <o> I2C0_SCL Pin <0=>P0_28
#define RTE_I2C0_SCL_PORT_ID            0
#if    (RTE_I2C0_SCL_PORT_ID == 0)
#define RTE_I2C0_SCL_PORT               0
#define RTE_I2C0_SCL_PIN                28
#define RTE_I2C0_SCL_FUNC               1
#else
#error "Invalid I2C0_SCL Pin Configuration!"
#endif

//   <o> I2C0_SDA Pin <0=>P0_27
#define RTE_I2C0_SDA_PORT_ID            0
#if    (RTE_I2C0_SDA_PORT_ID == 0)
#define RTE_I2C0_SDA_PORT               0
#define RTE_I2C0_SDA_PIN                27
#define RTE_I2C0_SDA_FUNC               1
#else
#error "Invalid I2C0_SDA Pin Configuration!"
#endif

// </e>


// <e> I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
// <i> Configuration settings for Driver_I2C1 in component ::Drivers:I2C
#define RTE_I2C1                        0

//   <o> I2C1_SCL Pin <0=>P0_1 <1=>P0_20
#define RTE_I2C1_SCL_PORT_ID            0
#if    (RTE_I2C1_SCL_PORT_ID == 0)
#define RTE_I2C1_SCL_PORT               0
#define RTE_I2C1_SCL_PIN                1
#define RTE_I2C1_SCL_FUNC               3
#elif  (RTE_I2C1_SCL_PORT_ID == 1)
#define RTE_I2C1_SCL_PORT               0
#define RTE_I2C1_SCL_PIN                20
#define RTE_I2C1_SCL_FUNC               3
#else
#error "Invalid I2C1_SCL Pin Configuration!"
#endif

//   <o> I2C1_SDA Pin <0=>P0_0 <1=>P0_19
#define RTE_I2C1_SDA_PORT_ID            0
#if    (RTE_I2C1_SDA_PORT_ID == 0)
#define RTE_I2C1_SDA_PORT               0
#define RTE_I2C1_SDA_PIN                0
#define RTE_I2C1_SDA_FUNC               3
#elif  (RTE_I2C1_SDA_PORT_ID == 1)
#define RTE_I2C1_SDA_PORT               0
#define RTE_I2C1_SDA_PIN                19
#define RTE_I2C1_SDA_FUNC               3
#else
#error "Invalid I2C1_SDA Pin Configuration!"
#endif

// </e>


// <e> I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2]
// <i> Configuration settings for Driver_I2C2 in component ::Drivers:I2C
#define RTE_I2C2                        0

//   <o> I2C2_SCL Pin <0=>P0_11
#define RTE_I2C2_SCL_PORT_ID            0
#if    (RTE_I2C2_SCL_PORT_ID == 0)
#define RTE_I2C2_SCL_PORT               0
#define RTE_I2C2_SCL_PIN                11
#define RTE_I2C2_SCL_FUNC               2
#else
#error "Invalid I2C2_SCL Pin Configuration!"
#endif

//   <o> I2C2_SDA Pin <0=>P0_10
#define RTE_I2C2_SDA_PORT_ID            0
#if    (RTE_I2C2_SDA_PORT_ID == 0)
#define RTE_I2C2_SDA_PORT               0
#define RTE_I2C2_SDA_PIN                10
#define RTE_I2C2_SDA_FUNC               2
#else
#error "Invalid I2C2_SDA Pin Configuration!"
#endif

// </e>

// <e> UART0 (Universal asynchronous receiver transmitter)
#define RTE_UART0                       0

//   <o> UART0_TX Pin <0=>Not used <1=>P0_2
//   <i> UART0 Serial Output pin
#define RTE_UART0_TX_ID                 0
#if    (RTE_UART0_TX_ID == 0)
#define RTE_UART0_TX_PIN_EN             0
#elif  (RTE_UART0_TX_ID == 1)
#define RTE_UART0_TX_PORT               0
#define RTE_UART0_TX_BIT                2
#define RTE_UART0_TX_FUNC               1
#else
#error "Invalid UART0_TX Pin Configuration!"
#endif
#ifndef RTE_UART0_TX_PIN_EN
#define RTE_UART0_TX_PIN_EN             1
#endif

//   <o> UART0_RX Pin <0=>Not used <1=>P0_3
//   <i> UART0 Serial Input pin
#define RTE_UART0_RX_ID                 0
#if    (RTE_UART0_RX_ID == 0)
#define RTE_UART0_RX_PIN_EN             0
#elif  (RTE_UART0_RX_ID == 1)
#define RTE_UART0_RX_PORT               0
#define RTE_UART0_RX_BIT                3
#define RTE_UART0_RX_FUNC               1
#else
#error "Invalid UART0_RX Pin Configuration!"
#endif
#ifndef RTE_UART0_RX_PIN_EN
#define RTE_UART0_RX_PIN_EN             1
#endif

//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART0_DMA_TX_EN           1
#define   RTE_UART0_DMA_TX_CH           0
//     <e> Rx
//       <o1> Channel    <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART0_DMA_RX_EN           1
#define   RTE_UART0_DMA_RX_CH           1
//   </h> DMA

//     </e>
// <e> UART1 (Universal asynchronous receiver transmitter)
#define RTE_UART1                       0

//   <o> U1_TX Pin <0=>Not used <1=>P0_15 <2=>P2_0
//   <i> UART1 Serial Output pin
#define RTE_UART1_TX_ID                 1
#if    (RTE_UART1_TX_ID == 0)
#define RTE_UART1_TX_PIN_EN             0
#elif  (RTE_UART1_TX_ID == 1)
#define RTE_UART1_TX_PORT               0
#define RTE_UART1_TX_BIT                15
#define RTE_UART1_TX_FUNC               1
#elif  (RTE_UART1_TX_ID == 2)
#define RTE_UART1_TX_PORT               2
#define RTE_UART1_TX_BIT                0
#define RTE_UART1_TX_FUNC               2
#else
#error "Invalid U1_TX Pin Configuration!"
#endif
#ifndef RTE_UART1_TX_PIN_EN
#define RTE_UART1_TX_PIN_EN             1
#endif

//   <o> U1_RX Pin <0=>Not used <1=>P0_16 <2=>P2_1
//   <i> UART1 Serial Input pin
#define RTE_UART1_RX_ID                 1
#if    (RTE_UART1_RX_ID == 0)
#define RTE_UART1_RX_PIN_EN             0
#elif  (RTE_UART1_RX_ID == 1)
#define RTE_UART1_RX_PORT               0
#define RTE_UART1_RX_BIT                16
#define RTE_UART1_RX_FUNC               1
#elif  (RTE_UART1_RX_ID == 2)
#define RTE_UART1_RX_PORT               2
#define RTE_UART1_RX_BIT                1
#define RTE_UART1_RX_FUNC               2
#else
#error "Invalid U1_RX Pin Configuration!"
#endif
#ifndef RTE_UART1_RX_PIN_EN
#define RTE_UART1_RX_PIN_EN             1
#endif

//     <h> Modem Lines
//      <o> CTS <0=>Not used <1=>P0_17 <2=>P2_2
#define RTE_UART1_CTS_ID                0
#if    (RTE_UART1_CTS_ID == 0)
#define RTE_UART1_CTS_PIN_EN            0
#elif  (RTE_UART1_CTS_ID == 1)
#define RTE_UART1_CTS_PORT              0
#define RTE_UART1_CTS_BIT               17
#define RTE_UART1_CTS_FUNC              1
#elif  (RTE_UART1_CTS_ID == 2)
#define RTE_UART1_CTS_PORT              2
#define RTE_UART1_CTS_BIT               2
#define RTE_UART1_CTS_FUNC              2
#else
#error "Invalid U1_CTS Pin Configuration!"
#endif
#ifndef RTE_UART1_CTS_PIN_EN
#define RTE_UART1_CTS_PIN_EN            1
#endif

//       
//      <o> DCD <0=>Not used <1=>P0_18 <2=>P2_3
#define RTE_UART1_DCD_ID                0
#if    (RTE_UART1_DCD_ID == 0)
#define RTE_UART1_DCD_PIN_EN            0
#elif  (RTE_UART1_DCD_ID == 1)
#define RTE_UART1_DCD_PORT              0
#define RTE_UART1_DCD_BIT               18
#define RTE_UART1_DCD_FUNC              1
#elif  (RTE_UART1_DCD_ID == 2)
#define RTE_UART1_DCD_PORT              2
#define RTE_UART1_DCD_BIT               3
#define RTE_UART1_DCD_FUNC              2
#else
#error "Invalid UART1_DCD Pin Configuration!"
#endif
#ifndef RTE_UART1_DCD_PIN_EN
#define RTE_UART1_DCD_PIN_EN            1
#endif

//      <o> DSR <0=>Not used <1=>P0_19  <2=>P2_4
#define RTE_UART1_DSR_ID                0
#if    (RTE_UART1_DSR_ID == 0)
#define RTE_UART1_DSR_PIN_EN            0
#elif  (RTE_UART1_DSR_ID == 1)
#define RTE_UART1_DSR_PORT              0
#define RTE_UART1_DSR_BIT               19
#define RTE_UART1_DSR_FUNC              1
#elif  (RTE_UART1_DSR_ID == 2)
#define RTE_UART1_DSR_PORT              2
#define RTE_UART1_DSR_BIT               4
#define RTE_UART1_DSR_FUNC              2
#else
#error "Invalid UART1_DSR Pin Configuration!"
#endif
#ifndef RTE_UART1_DSR_PIN_EN
#define RTE_UART1_DSR_PIN_EN            1
#endif

//      <o> DTR <0=>Not used <1=>P0_20  <2=>P2_5
#define RTE_UART1_DTR_ID                0
#if    (RTE_UART1_DTR_ID == 0)
#define RTE_UART1_DTR_PIN_EN            0
#elif  (RTE_UART1_DTR_ID == 1)
#define RTE_UART1_DTR_PORT              0
#define RTE_UART1_DTR_BIT               20
#define RTE_UART1_DTR_FUNC              1
#elif  (RTE_UART1_DTR_ID == 2)
#define RTE_UART1_DTR_PORT              2
#define RTE_UART1_DTR_BIT               5
#define RTE_UART1_DTR_FUNC              2
#else
#error "Invalid UART1_DTR Pin Configuration!"
#endif
#ifndef RTE_UART1_DTR_PIN_EN
#define RTE_UART1_DTR_PIN_EN            1
#endif

//       <o> RI <0=>Not used <1=>P0_21 <2=>P2_6
#define RTE_UART1_RI_ID                 0
#if    (RTE_UART1_RI_ID == 0)
#define RTE_UART1_RI_PIN_EN             0
#elif  (RTE_UART1_RI_ID == 1)
#define RTE_UART1_RI_PORT               0
#define RTE_UART1_RI_BIT                21
#define RTE_UART1_RI_FUNC               1
#elif  (RTE_UART1_RI_ID == 2)
#define RTE_UART1_RI_PORT               2
#define RTE_UART1_RI_BIT                6
#define RTE_UART1_RI_FUNC               2
#else
#error "Invalid UART1_RI Pin Configuration!"
#endif
#ifndef RTE_UART1_RI_PIN_EN
#define RTE_UART1_RI_PIN_EN             1
#endif

//       <o> RTS <0=>Not used <1=>P0_22  <2=>P2_7
#define RTE_UART1_RTS_ID                0
#if    (RTE_UART1_RTS_ID == 0)
#define RTE_UART1_RTS_PIN_EN            0
#elif  (RTE_UART1_RTS_ID == 1)
#define RTE_UART1_RTS_PORT              0
#define RTE_UART1_RTS_BIT               22
#define RTE_UART1_RTS_FUNC              1
#elif  (RTE_UART1_RTS_ID == 2)
#define RTE_UART1_RTS_PORT              2
#define RTE_UART1_RTS_BIT               7
#define RTE_UART1_RTS_FUNC              2
#else
#error "Invalid UART1_RTS Pin Configuration!"
#endif
#ifndef RTE_UART1_RTS_PIN_EN
#define RTE_UART1_RTS_PIN_EN            1
#endif

//     </h>

//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART1_DMA_TX_EN           1
#define   RTE_UART1_DMA_TX_CH           0
//     <e> Rx
//       <o1> Channel    <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART1_DMA_RX_EN           1
#define   RTE_UART1_DMA_RX_CH           1
//   </h> DMA

// </e>

// <e> UART2 (Universal asynchronous receiver transmitter)
#define RTE_UART2                       0

//   <o> UART2_TX Pin <0=>Not used <1=>P0_10 <2=>P2_8
//   <i> UART2 Serial Output pin
#define RTE_UART2_TX_ID                 0
#if    (RTE_UART2_TX_ID == 0)
#define RTE_UART2_TX_PIN_EN             0
#elif  (RTE_UART2_TX_ID == 1)
#define RTE_UART2_TX_PORT               0
#define RTE_UART2_TX_BIT                10
#define RTE_UART2_TX_FUNC               1
#elif  (RTE_UART2_TX_ID == 2)
#define RTE_UART2_TX_PORT               2
#define RTE_UART2_TX_BIT                8
#define RTE_UART2_TX_FUNC               2
#else
#error "Invalid UART2_TX Pin Configuration!"
#endif
#ifndef RTE_UART2_TX_PIN_EN
#define RTE_UART2_TX_PIN_EN             1
#endif

//   <o> UART2_RX Pin <0=>Not used <1=>P0_11 <2=>P2_9
//   <i> UART2 Serial Input pin
#define RTE_UART2_RX_ID                 0
#if    (RTE_UART2_RX_ID == 0)
#define RTE_UART2_RX_PIN_EN             0
#elif  (RTE_UART2_RX_ID == 1)
#define RTE_UART2_RX_PORT               0
#define RTE_UART2_RX_BIT                11
#define RTE_UART2_RX_FUNC               1
#elif  (RTE_UART2_RX_ID == 2)
#define RTE_UART2_RX_PORT               2
#define RTE_UART2_RX_BIT                9
#define RTE_UART2_RX_FUNC               2
#else
#error "Invalid UART2_RX Pin Configuration!"
#endif
#ifndef RTE_UART2_RX_PIN_EN
#define RTE_UART2_RX_PIN_EN             1
#endif

//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART2_DMA_TX_EN           1
#define   RTE_UART2_DMA_TX_CH           0
//     <e> Rx
//       <o1> Channel    <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART2_DMA_RX_EN           1
#define   RTE_UART2_DMA_RX_CH           1
//   </h> DMA

//     </e>

// <e> UART3 (Universal asynchronous receiver transmitter)
#define RTE_UART3                       0

//   <o> UART3_TX Pin <0=>Not used <1=>P0_0 <2=>P0_25 <3=>P4_28
//   <i> UART3 Serial Output pin
#define RTE_UART3_TX_ID                 0
#if    (RTE_UART3_TX_ID == 0)
#define RTE_UART3_TX_PIN_EN             0
#elif  (RTE_UART3_TX_ID == 1)
#define RTE_UART3_TX_PORT               0
#define RTE_UART3_TX_BIT                0
#define RTE_UART3_TX_FUNC               2
#elif  (RTE_UART3_TX_ID == 2)
#define RTE_UART3_TX_PORT               0
#define RTE_UART3_TX_BIT                25
#define RTE_UART3_TX_FUNC               3
#elif  (RTE_UART3_TX_ID == 3)
#define RTE_UART3_TX_PORT               4
#define RTE_UART3_TX_BIT                28
#define RTE_UART3_TX_FUNC               3
#else
#error "Invalid UART3_TX Pin Configuration!"
#endif
#ifndef RTE_UART3_TX_PIN_EN
#define RTE_UART3_TX_PIN_EN             1
#endif

//   <o> UART3_RX Pin <0=>Not used <1=>P0_1 <2=>P0_26 <3=>P4_29
//   <i> UART3 Serial Input pin
#define RTE_UART3_RX_ID                 0
#if    (RTE_UART3_RX_ID == 0)
#define RTE_UART3_RX_PIN_EN             0
#elif  (RTE_UART3_RX_ID == 1)
#define RTE_UART3_RX_PORT               0
#define RTE_UART3_RX_BIT                1
#define RTE_UART3_RX_FUNC               2
#elif  (RTE_UART3_RX_ID == 2)
#define RTE_UART3_RX_PORT               0
#define RTE_UART3_RX_BIT                26
#define RTE_UART3_RX_FUNC               3
#elif  (RTE_UART3_RX_ID == 3)
#define RTE_UART3_RX_PORT               4
#define RTE_UART3_RX_BIT                29
#define RTE_UART3_RX_FUNC               3
#else
#error "Invalid UART3_RX Pin Configuration!"
#endif
#ifndef RTE_UART3_RX_PIN_EN
#define RTE_UART3_RX_PIN_EN             1
#endif

//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART3_DMA_TX_EN           1
#define   RTE_UART3_DMA_TX_CH           0
//     <e> Rx
//       <o1> Channel    <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_UART3_DMA_RX_EN           1
#define   RTE_UART3_DMA_RX_CH           1
//   </h> DMA

// </e>

// <e> CAN1 Controller [Driver_CAN1]
// <i> Configuration settings for Driver_CAN1 in component ::Drivers:CAN
#define   RTE_CAN_CAN1                  0

//   <h> Pin Configuration
//     <o> CAN1_RD <0=>Not used <1=>P0_0 <2=>P0_21
//     <i> CAN1 receiver input.
#define   RTE_CAN1_RD_ID                0
#if      (RTE_CAN1_RD_ID == 0)
  #define RTE_CAN1_RD_PIN_EN            0
#elif    (RTE_CAN1_RD_ID == 1)
  #define RTE_CAN1_RD_PORT              0
  #define RTE_CAN1_RD_BIT               0
  #define RTE_CAN1_RD_FUNC              1
#elif    (RTE_CAN1_RD_ID == 2)
  #define RTE_CAN1_RD_PORT              0
  #define RTE_CAN1_RD_BIT               21
  #define RTE_CAN1_RD_FUNC              3
#else
  #error "Invalid RTE_CAN1_RD Pin Configuration!"
#endif
#ifndef   RTE_CAN1_RD_PIN_EN
  #define RTE_CAN1_RD_PIN_EN            1
#endif
//     <o> CAN1_TD <0=>Not used <1=>P0_1 <2=>P0_22
//     <i> CAN1 transmitter output.
#define   RTE_CAN1_TD_ID                0
#if      (RTE_CAN1_TD_ID == 0)
  #define RTE_CAN1_TD_PIN_EN            0
#elif    (RTE_CAN1_TD_ID == 1)
  #define RTE_CAN1_TD_PORT              0
  #define RTE_CAN1_TD_BIT               1
  #define RTE_CAN1_TD_FUNC              1
#elif    (RTE_CAN1_TD_ID == 2)
  #define RTE_CAN1_TD_PORT              0
  #define RTE_CAN1_TD_BIT               22
  #define RTE_CAN1_TD_FUNC              3
#else
  #error "Invalid RTE_CAN1_TD Pin Configuration!"
#endif
#ifndef   RTE_CAN1_TD_PIN_EN
  #define RTE_CAN1_TD_PIN_EN            1
#endif
//   </h> Pin Configuration
// </e> CAN1 Controller [Driver_CAN1]

// <e> CAN2 Controller [Driver_CAN2]
// <i> Configuration settings for Driver_CAN2 in component ::Drivers:CAN
#define   RTE_CAN_CAN2                  0

//   <h> Pin Configuration
//     <o> CAN2_RD <0=>Not used <1=>P0_4 <2=>P2_7
//     <i> CAN2 receiver input.
#define   RTE_CAN2_RD_ID                0
#if      (RTE_CAN2_RD_ID == 0)
  #define RTE_CAN2_RD_PIN_EN            0
#elif    (RTE_CAN2_RD_ID == 1)
  #define RTE_CAN2_RD_PORT              0
  #define RTE_CAN2_RD_BIT               4
  #define RTE_CAN2_RD_FUNC              2
#elif    (RTE_CAN2_RD_ID == 2)
  #define RTE_CAN2_RD_PORT              2
  #define RTE_CAN2_RD_BIT               7
  #define RTE_CAN2_RD_FUNC              1
#else
  #error "Invalid RTE_CAN2_RD Pin Configuration!"
#endif
#ifndef   RTE_CAN2_RD_PIN_EN
  #define RTE_CAN2_RD_PIN_EN            1
#endif
//     <o> CAN2_TD <0=>Not used <1=>P0_5 <2=>P2_8
//     <i> CAN2 transmitter output.
#define   RTE_CAN2_TD_ID                0
#if      (RTE_CAN2_TD_ID == 0)
  #define RTE_CAN2_TD_PIN_EN            0
#elif    (RTE_CAN2_TD_ID == 1)
  #define RTE_CAN2_TD_PORT              0
  #define RTE_CAN2_TD_BIT               5
  #define RTE_CAN2_TD_FUNC              2
#elif    (RTE_CAN2_TD_ID == 2)
  #define RTE_CAN2_TD_PORT              2
  #define RTE_CAN2_TD_BIT               8
  #define RTE_CAN2_TD_FUNC              1
#else
  #error "Invalid RTE_CAN2_TD Pin Configuration!"
#endif
#ifndef   RTE_CAN2_TD_PIN_EN
  #define RTE_CAN2_TD_PIN_EN            1
#endif
//   </h> Pin Configuration
// </e> CAN2 Controller [Driver_CAN2]


// <e> SSP0 (Synchronous Serial Port 0) [Driver_SPI0]
// <i> Configuration settings for Driver_SPI0 in component ::Drivers:SPI
#define RTE_SSP0                        0

//   <h> Pin Configuration
//     <o> SSP0_SSEL <0=>Not used <1=>P0_16 <2=>P1_21
//     <i> Slave Select for SSP0
#define   RTE_SSP0_SSEL_PIN_SEL         1
#if      (RTE_SSP0_SSEL_PIN_SEL == 0)
#define   RTE_SSP0_SSEL_PIN_EN          0
#elif    (RTE_SSP0_SSEL_PIN_SEL == 1)
  #define RTE_SSP0_SSEL_PORT            0
  #define RTE_SSP0_SSEL_BIT             16
  #define RTE_SSP0_SSEL_FUNC            2
#elif    (RTE_SSP0_SSEL_PIN_SEL == 2)
  #define RTE_SSP0_SSEL_PORT            1
  #define RTE_SSP0_SSEL_BIT             21
  #define RTE_SSP0_SSEL_FUNC            3
#else
  #error "Invalid SSP0 SSP0_SSEL Pin Configuration!"
#endif
#ifndef   RTE_SSP0_SSEL_PIN_EN
#define   RTE_SSP0_SSEL_PIN_EN          1
#endif

//     <o> SSP0_SCK <0=>P0_15 <1=>P1_20
//     <i> Serial clock for SSP0
#define   RTE_SSP0_SCK_PIN_SEL          0
#if      (RTE_SSP0_SCK_PIN_SEL == 0)
  #define RTE_SSP0_SCK_PORT             0
  #define RTE_SSP0_SCK_BIT              15
  #define RTE_SSP0_SCK_FUNC             2
#elif    (RTE_SSP0_SCK_PIN_SEL == 1)
  #define RTE_SSP0_SCK_PORT             1
  #define RTE_SSP0_SCK_BIT              20
  #define RTE_SSP0_SCK_FUNC             3
#else
  #error "Invalid SSP0 SSP0_SCK Pin Configuration!"
#endif

//     <o> SSP0_MISO <0=>Not used <1=>P0_17 <2=>P1_23
//     <i> Master In Slave Out for SSP0
#define   RTE_SSP0_MISO_PIN_SEL         0
#if      (RTE_SSP0_MISO_PIN_SEL == 0)
  #define RTE_SSP0_MISO_PIN_EN          0
#elif    (RTE_SSP0_MISO_PIN_SEL == 1)
  #define RTE_SSP0_MISO_PORT            0
  #define RTE_SSP0_MISO_BIT             17
  #define RTE_SSP0_MISO_FUNC            2
#elif    (RTE_SSP0_MISO_PIN_SEL == 2)
  #define RTE_SSP0_MISO_PORT            1
  #define RTE_SSP0_MISO_BIT             23
  #define RTE_SSP0_MISO_FUNC            3
#else
  #error "Invalid SSP0 SSP0_MISO Pin Configuration!"
#endif
#ifndef   RTE_SSP0_MISO_PIN_EN
#define   RTE_SSP0_MISO_PIN_EN          1
#endif

//     <o> SSP0_MOSI <0=>Not used <1=>P0_18 <2=>P1_24
//     <i> Master Out Slave In for SSP0
#define   RTE_SSP0_MOSI_PIN_SEL         0
#if      (RTE_SSP0_MOSI_PIN_SEL == 0)
  #define RTE_SSP0_MOSI_PIN_EN          0
#elif    (RTE_SSP0_MOSI_PIN_SEL == 1)
  #define RTE_SSP0_MOSI_PORT            0
  #define RTE_SSP0_MOSI_BIT             18
  #define RTE_SSP0_MOSI_FUNC            2
#elif    (RTE_SSP0_MOSI_PIN_SEL == 2)
  #define RTE_SSP0_MOSI_PORT            1
  #define RTE_SSP0_MOSI_BIT             24
  #define RTE_SSP0_MOSI_FUNC            3
#else
  #error "Invalid SSP0 SSP0_MOSI Pin Configuration!"
#endif
#ifndef   RTE_SSP0_MOSI_PIN_EN
#define   RTE_SSP0_MOSI_PIN_EN          1
#endif

//   </h>
//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
// </e>
#define   RTE_SSP0_DMA_TX_EN            0
#define   RTE_SSP0_DMA_TX_CH            0
//     <e> Rx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_SSP0_DMA_RX_EN            0
#define   RTE_SSP0_DMA_RX_CH            1
//   </h> DMA
// </e>

// <e> SSP1 (Synchronous Serial Port 1) [Driver_SPI1]
// <i> Configuration settings for Driver_SPI1 in component ::Drivers:SPI
#define RTE_SSP1                        0

//   <h> Pin Configuration
//     <o> SSP1_SSEL <0=>Not used <1=>P0_6
//     <i> Slave Select for SSP1
#define   RTE_SSP1_SSEL_PIN_SEL         1
#if      (RTE_SSP1_SSEL_PIN_SEL == 0)
  #define RTE_SSP1_SSEL_PIN_EN          0
#elif    (RTE_SSP1_SSEL_PIN_SEL == 1)
  #define RTE_SSP1_SSEL_PORT            0
  #define RTE_SSP1_SSEL_BIT             6
  #define RTE_SSP1_SSEL_FUNC            2
#else
  #error "Invalid SSP1 SSP1_SSEL Pin Configuration!"
#endif
#ifndef   RTE_SSP1_SSEL_PIN_EN
#define   RTE_SSP1_SSEL_PIN_EN          1
#endif

//     <o> SSP1_SCK <0=>P0_7 <1=>P1_31
//     <i> Serial clock for SSP1
#define   RTE_SSP1_SCK_PIN_SEL          0
#if      (RTE_SSP1_SCK_PIN_SEL == 0)
  #define RTE_SSP1_SCK_PORT             0
  #define RTE_SSP1_SCK_BIT              7
  #define RTE_SSP1_SCK_FUNC             2
#elif    (RTE_SSP1_SCK_PIN_SEL == 1)
  #define RTE_SSP1_SCK_PORT             1
  #define RTE_SSP1_SCK_BIT              31
  #define RTE_SSP1_SCK_FUNC             2
#else
  #error "Invalid SSP1 SSP1_SCK Pin Configuration!"
#endif

//     <o> SSP1_MISO <0=>Not used <1=>P0_8
//     <i> Master In Slave Out for SSP1
#define   RTE_SSP1_MISO_PIN_SEL         0
#if      (RTE_SSP1_MISO_PIN_SEL == 0)
  #define RTE_SSP1_MISO_PIN_EN          0
#elif    (RTE_SSP1_MISO_PIN_SEL == 1)
  #define RTE_SSP1_MISO_PORT            0
  #define RTE_SSP1_MISO_BIT             8
  #define RTE_SSP1_MISO_FUNC            2
#else
  #error "Invalid SSP1 SSP1_MISO Pin Configuration!"
#endif
#ifndef   RTE_SSP1_MISO_PIN_EN
#define   RTE_SSP1_MISO_PIN_EN          1
#endif

//     <o> SSP1_MOSI <0=>Not used <1=>P0_9
//     <i> Master Out Slave In for SSP1
#define   RTE_SSP1_MOSI_PIN_SEL         0
#if      (RTE_SSP1_MOSI_PIN_SEL == 0)
  #define RTE_SSP1_MOSI_PIN_EN          0
#elif    (RTE_SSP1_MOSI_PIN_SEL == 1)
  #define RTE_SSP1_MOSI_PORT            0
  #define RTE_SSP1_MOSI_BIT             9
  #define RTE_SSP1_MOSI_FUNC            2
#else
  #error "Invalid SSP1 SSP1_MOSI Pin Configuration!"
#endif
#ifndef   RTE_SSP1_MOSI_PIN_EN
#define   RTE_SSP1_MOSI_PIN_EN          1
#endif

//   </h>
//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_SSP1_DMA_TX_EN            0
#define   RTE_SSP1_DMA_TX_CH            2
//     <e> Rx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//     </e>
#define   RTE_SSP1_DMA_RX_EN            0
#define   RTE_SSP1_DMA_RX_CH            3
//   </h> DMA
// </e>


// <e> SPI (Serial Peripheral Interface) [Driver_SPI2]
// <i> Configuration settings for Driver_SPI2 in component ::Drivers:SPI
#define   RTE_SPI                       0

//   <h> Pin Configuration
//     <o> SPI_SSEL <0=>Not used <1=>P0_16
//     <i> Slave Select for SPI
#define   RTE_SPI_SSEL_PIN_SEL          0
#if      (RTE_SPI_SSEL_PIN_SEL == 0)
#define   RTE_SPI_SSEL_PIN_EN           0
#elif    (RTE_SPI_SSEL_PIN_SEL == 1)
  #define RTE_SPI_SSEL_PORT             0
  #define RTE_SPI_SSEL_BIT              16
  #define RTE_SPI_SSEL_FUNC             3
#else
  #error "Invalid SPI SPI_SSEL Pin Configuration!"
#endif
#ifndef   RTE_SPI_SSEL_PIN_EN
#define   RTE_SPI_SSEL_PIN_EN           1
#endif
//     <o> SPI_SCK <0=>P0_15
//     <i> Serial clock for SPI
#define   RTE_SPI_SCK_PIN_SEL           0
#if      (RTE_SPI_SCK_PIN_SEL == 0)
  #define RTE_SPI_SCK_PORT              0
  #define RTE_SPI_SCK_BIT               15
  #define RTE_SPI_SCK_FUNC              3
#else
  #error "Invalid SPI SPI_SCK Pin Configuration!"
#endif
//     <o> SPI_MISO <0=>Not used <1=>P0_17
//     <i> Master In Slave Out for SPI
#define   RTE_SPI_MISO_PIN_SEL          0
#if      (RTE_SPI_MISO_PIN_SEL == 0)
  #define RTE_SPI_MISO_PIN_EN           0
#elif    (RTE_SPI_MISO_PIN_SEL == 1)
  #define RTE_SPI_MISO_PORT             0
  #define RTE_SPI_MISO_BIT              17
  #define RTE_SPI_MISO_FUNC             3
#else
  #error "Invalid SPI SPI_MISO Pin Configuration!"
#endif
#ifndef   RTE_SPI_MISO_PIN_EN
#define   RTE_SPI_MISO_PIN_EN           1
#endif

//     <o> SPI_MOSI <0=>Not used <1=>P0_18
//     <i> Master Out Slave In for SPI
#define   RTE_SPI_MOSI_PIN_SEL          0
#if      (RTE_SPI_MOSI_PIN_SEL == 0)
  #define RTE_SPI_MOSI_PIN_EN           0
#elif    (RTE_SPI_MOSI_PIN_SEL == 1)
  #define RTE_SPI_MOSI_PORT             0
  #define RTE_SPI_MOSI_BIT              18
  #define RTE_SPI_MOSI_FUNC             3
#else
  #error "Invalid SPI SPI_MOSI Pin Configuration!"
#endif
#ifndef   RTE_SPI_MOSI_PIN_EN
#define   RTE_SPI_MOSI_PIN_EN           1
#endif

//   </h> Pin Configuration
// </e> SPI (Serial Peripheral Interface) [Driver_SPI2]


// <e> I2S0 (Integrated Interchip Sound 0) [Driver_SAI0]
// <i> Configuration settings for Driver_SAI0 in component ::Drivers:SAI
#define   RTE_I2S0                      0

//   <h> Pin Configuration
//     <o> I2S0_RX_SCK <0=>Not used <1=>P0_4 <2=>P0_23
//     <i> Receive clock for I2S0
#define   RTE_I2S0_RX_SCK_PIN_SEL       1
#if      (RTE_I2S0_RX_SCK_PIN_SEL == 0)
#define   RTE_I2S0_RX_SCK_PIN_EN        0
#elif    (RTE_I2S0_RX_SCK_PIN_SEL == 1)
  #define RTE_I2S0_RX_SCK_PORT          0
  #define RTE_I2S0_RX_SCK_BIT           4
  #define RTE_I2S0_RX_SCK_FUNC          1
#elif    (RTE_I2S0_RX_SCK_PIN_SEL == 2)
  #define RTE_I2S0_RX_SCK_PORT          0
  #define RTE_I2S0_RX_SCK_BIT           23
  #define RTE_I2S0_RX_SCK_FUNC          2
#else
  #error "Invalid I2S0 I2S0_RX_SCK Pin Configuration!"
#endif
#ifndef   RTE_I2S0_RX_SCK_PIN_EN
#define   RTE_I2S0_RX_SCK_PIN_EN        1
#endif
//     <o> I2S0_RX_WS <0=>Not used <1=>P0_5 <2=>P0_24
//     <i> Receive word select for I2S0
#define   RTE_I2S0_RX_WS_PIN_SEL        1
#if      (RTE_I2S0_RX_WS_PIN_SEL == 0)
#define   RTE_I2S0_RX_WS_PIN_EN         0
#elif    (RTE_I2S0_RX_WS_PIN_SEL == 1)
  #define RTE_I2S0_RX_WS_PORT           0
  #define RTE_I2S0_RX_WS_BIT            5
  #define RTE_I2S0_RX_WS_FUNC           1
#elif    (RTE_I2S0_RX_WS_PIN_SEL == 2)
  #define RTE_I2S0_RX_WS_PORT           0
  #define RTE_I2S0_RX_WS_BIT            24
  #define RTE_I2S0_RX_WS_FUNC           2
#else
  #error "Invalid I2S0 I2S0_RX_WS Pin Configuration!"
#endif
#ifndef   RTE_I2S0_RX_WS_PIN_EN
#define   RTE_I2S0_RX_WS_PIN_EN         1
#endif
//     <o> I2S0_RX_SDA <0=>Not used <1=>P0_6 <2=>P0_25
//     <i> Receive master clock for I2S0
#define   RTE_I2S0_RX_SDA_PIN_SEL       1
#if      (RTE_I2S0_RX_SDA_PIN_SEL == 0)
#define   RTE_I2S0_RX_SDA_PIN_EN        0
#elif    (RTE_I2S0_RX_SDA_PIN_SEL == 1)
  #define RTE_I2S0_RX_SDA_PORT          0
  #define RTE_I2S0_RX_SDA_BIT           6
  #define RTE_I2S0_RX_SDA_FUNC          1
#elif    (RTE_I2S0_RX_SDA_PIN_SEL == 2)
  #define RTE_I2S0_RX_SDA_PORT          0
  #define RTE_I2S0_RX_SDA_BIT           25
  #define RTE_I2S0_RX_SDA_FUNC          2
#else
  #error "Invalid I2S0 I2S0_RX_SDA Pin Configuration!"
#endif
#ifndef   RTE_I2S0_RX_SDA_PIN_EN
#define   RTE_I2S0_RX_SDA_PIN_EN       1
#endif
//     <o> I2S0_RX_MCLK <0=>Not used <1=>P4_28
//     <i> Receive master clock for I2S0
#define   RTE_I2S0_RX_MCLK_PIN_SEL      0
#if      (RTE_I2S0_RX_MCLK_PIN_SEL == 0)
#define   RTE_I2S0_RX_MCLK_PIN_EN       0
#elif    (RTE_I2S0_RX_MCLK_PIN_SEL == 1)
  #define RTE_I2S0_RX_MCLK_PORT         4
  #define RTE_I2S0_RX_MCLK_BIT          28
  #define RTE_I2S0_RX_MCLK_FUNC         1
#else
  #error "Invalid I2S0 I2S0_RX_MCLK Pin Configuration!"
#endif
#ifndef   RTE_I2S0_RX_MCLK_PIN_EN
#define   RTE_I2S0_RX_MCLK_PIN_EN       1
#endif
//     <o> I2S0_TX_SCK <0=>Not used <1=>P0_7 <2=>P2_11
//     <i> Transmit clock for I2S0
#define   RTE_I2S0_TX_SCK_PIN_SEL       1
#if      (RTE_I2S0_TX_SCK_PIN_SEL == 0)
#define   RTE_I2S0_TX_SCK_PIN_EN        0
#elif    (RTE_I2S0_TX_SCK_PIN_SEL == 1)
  #define RTE_I2S0_TX_SCK_PORT          0
  #define RTE_I2S0_TX_SCK_BIT           7
  #define RTE_I2S0_TX_SCK_FUNC          1
#elif    (RTE_I2S0_TX_SCK_PIN_SEL == 2)
  #define RTE_I2S0_TX_SCK_PORT          2
  #define RTE_I2S0_TX_SCK_BIT           11
  #define RTE_I2S0_TX_SCK_FUNC          3
#else
  #error "Invalid I2S0 I2S0_TX_SCK Pin Configuration!"
#endif
#ifndef   RTE_I2S0_TX_SCK_PIN_EN
#define   RTE_I2S0_TX_SCK_PIN_EN        1
#endif
//     <o> I2S0_TX_WS <0=>Not used <1=>P0_8 <2=>P2_12
//     <i> Transmit word select for I2S0
#define   RTE_I2S0_TX_WS_PIN_SEL        1
#if      (RTE_I2S0_TX_WS_PIN_SEL == 0)
#define   RTE_I2S0_TX_WS_PIN_EN         0
#elif    (RTE_I2S0_TX_WS_PIN_SEL == 1)
  #define RTE_I2S0_TX_WS_PORT           0
  #define RTE_I2S0_TX_WS_BIT            8
  #define RTE_I2S0_TX_WS_FUNC           1
#elif    (RTE_I2S0_TX_WS_PIN_SEL == 2)
  #define RTE_I2S0_TX_WS_PORT           2
  #define RTE_I2S0_TX_WS_BIT            12
  #define RTE_I2S0_TX_WS_FUNC           3
#else
  #error "Invalid I2S0 I2S0_TX_WS Pin Configuration!"
#endif
#ifndef   RTE_I2S0_TX_WS_PIN_EN
#define   RTE_I2S0_TX_WS_PIN_EN         1
#endif
//     <o> I2S0_TX_SDA <0=>Not used <1=>P0_9 <2=>P2_13
//     <i> Transmit data for I2S0
#define   RTE_I2S0_TX_SDA_PIN_SEL       1
#if      (RTE_I2S0_TX_SDA_PIN_SEL == 0)
#define   RTE_I2S0_TX_SDA_PIN_EN        0
#elif    (RTE_I2S0_TX_SDA_PIN_SEL == 1)
  #define RTE_I2S0_TX_SDA_PORT          0
  #define RTE_I2S0_TX_SDA_BIT           9
  #define RTE_I2S0_TX_SDA_FUNC          1
#elif    (RTE_I2S0_TX_SDA_PIN_SEL == 2)
  #define RTE_I2S0_TX_SDA_PORT          2
  #define RTE_I2S0_TX_SDA_BIT           13
  #define RTE_I2S0_TX_SDA_FUNC          3
#else
  #error "Invalid I2S0 I2S0_TX_SDA Pin Configuration!"
#endif
#ifndef   RTE_I2S0_TX_SDA_PIN_EN
#define   RTE_I2S0_TX_SDA_PIN_EN        1
#endif
//     <o> I2S0_TX_MCLK <0=>Not used <1=>P4_29
//     <i> Transmit master clock for I2S0
#define   RTE_I2S0_TX_MCLK_PIN_SEL      1
#if      (RTE_I2S0_TX_MCLK_PIN_SEL == 0)
#define   RTE_I2S0_TX_MCLK_PIN_EN       0
#elif    (RTE_I2S0_TX_MCLK_PIN_SEL == 1)
  #define RTE_I2S0_TX_MCLK_PORT         4
  #define RTE_I2S0_TX_MCLK_BIT          29
  #define RTE_I2S0_TX_MCLK_FUNC         1
#else
  #error "Invalid I2S0 I2S0_TX_MCLK Pin Configuration!"
#endif
#ifndef   RTE_I2S0_TX_MCLK_PIN_EN
#define   RTE_I2S0_TX_MCLK_PIN_EN       1
#endif
//   </h> Pin Configuration

//   <h> DMA
//     <e> Tx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//       <o2> Peripheral  <0=>9 (DMAMUXPER9)
//     </e>
#define   RTE_I2S0_DMA_TX_EN            1
#define   RTE_I2S0_DMA_TX_CH            0
//     <e> Rx
//       <o1> Channel     <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
//       <o2> Peripheral  <0=>10 (DMAMUXPER10)
//     </e>
#define   RTE_I2S0_DMA_RX_EN            1
#define   RTE_I2S0_DMA_RX_CH            1
//   </h> DMA
// </e> I2S0 (Integrated Interchip Sound 0) [Driver_SAI0]

#endif  /* __RTE_DEVICE_H */