Skip to content

Commit b7be277

Browse files
authored
Merge pull request #12280 from amq/patch-2
EFM32: add UART and LEUART for EFM32GG11
2 parents 7e2f5a3 + 860ccde commit b7be277

File tree

1 file changed

+78
-2
lines changed

1 file changed

+78
-2
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG11/PeripheralPins.c

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,32 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
452452
#endif
453453
{NC , NC , NC}
454454
};
455+
#endif
455456

457+
#if DEVICE_SERIAL
456458
/************UART**************/
457459
MBED_WEAK const PinMap PinMap_UART_TX[] = {
460+
#ifdef UART0_BASE
461+
/* UART0 */
462+
{PF6, UART_0, 0},
463+
{PE0, UART_0, 1},
464+
{PA3, UART_0, 2},
465+
{PC14, UART_0, 3},
466+
{PC4, UART_0, 4},
467+
{PF1, UART_0, 5},
468+
{PD7, UART_0, 6},
469+
#endif
470+
#ifdef UART1_BASE
471+
/* UART1 */
472+
{PC12, UART_1, 0},
473+
{PF10, UART_1, 1},
474+
{PB9, UART_1, 2},
475+
{PE2, UART_1, 3},
476+
{PE12, UART_1, 4},
477+
{PH11, UART_1, 5},
478+
#endif
458479
#ifdef USART0_BASE
480+
/* USART0 */
459481
{PE10, USART_0, 0},
460482
{PE7, USART_0, 1},
461483
{PC11, USART_0, 2},
@@ -506,14 +528,50 @@ MBED_WEAK const PinMap PinMap_UART_TX[] = {
506528
{PA6, USART_5, 1},
507529
{PF15, USART_5, 2},
508530
{PH10, USART_5, 3},
531+
#endif
532+
#ifdef LEUART0_BASE
533+
/* LEUART0 */
534+
{PD4, LEUART_0, 0},
535+
{PB13, LEUART_0, 1},
536+
{PE14, LEUART_0, 2},
537+
{PF0, LEUART_0, 3},
538+
{PF2, LEUART_0, 4},
539+
{PC14, LEUART_0, 5},
540+
#endif
541+
#ifdef LEUART1_BASE
542+
/* LEUART1 */
543+
{PC6, LEUART_1, 0},
544+
{PA5, LEUART_1, 1},
545+
{PD2, LEUART_1, 2},
546+
{PB0, LEUART_1, 3},
547+
{PB4, LEUART_1, 4},
548+
{PH0, LEUART_1, 5},
509549
#endif
510550
{NC , NC , NC}
511551
};
512-
#endif
513552

514-
#if DEVICE_SERIAL
515553
MBED_WEAK const PinMap PinMap_UART_RX[] = {
554+
#ifdef UART0_BASE
555+
/* UART0 */
556+
{PF7, UART_0, 0},
557+
{PE1, UART_0, 1},
558+
{PA4, UART_0, 2},
559+
{PC15, UART_0, 3},
560+
{PC5, UART_0, 4},
561+
{PF2, UART_0, 5},
562+
{PE4, UART_0, 6},
563+
#endif
564+
#ifdef UART1_BASE
565+
/* UART1 */
566+
{PC13, UART_1, 0},
567+
{PF11, UART_1, 1},
568+
{PB10, UART_1, 2},
569+
{PE3, UART_1, 3},
570+
{PE13, UART_1, 4},
571+
{PH12, UART_1, 5},
572+
#endif
516573
#ifdef USART0_BASE
574+
/* USART0 */
517575
{PE11, USART_0, 0},
518576
{PE6, USART_0, 1},
519577
{PC10, USART_0, 2},
@@ -564,6 +622,24 @@ MBED_WEAK const PinMap PinMap_UART_RX[] = {
564622
{PA7, USART_5, 1},
565623
{PB1, USART_5, 2},
566624
{PH11, USART_5, 3},
625+
#endif
626+
#ifdef LEUART0_BASE
627+
/* LEUART0 */
628+
{PD5, LEUART_0, 0},
629+
{PB14, LEUART_0, 1},
630+
{PE15, LEUART_0, 2},
631+
{PF1, LEUART_0, 3},
632+
{PA0, LEUART_0, 4},
633+
{PC15, LEUART_0, 5},
634+
#endif
635+
#ifdef LEUART1_BASE
636+
/* LEUART1 */
637+
{PC7, LEUART_1, 0},
638+
{PA6, LEUART_1, 1},
639+
{PD3, LEUART_1, 2},
640+
{PB1, LEUART_1, 3},
641+
{PB5, LEUART_1, 4},
642+
{PH1, LEUART_1, 5},
567643
#endif
568644
{NC , NC , NC}
569645
};

0 commit comments

Comments
 (0)