Add LPC1768 Serial ports for pinsDebug (#16980)

This commit is contained in:
ellensp 2020-02-26 23:12:53 +13:00 committed by GitHub
parent 5ebba4b19f
commit 70af080813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@
#line 46 #line 46
// manually add pins that have names that are macros which don't play well with these macros // manually add pins that have names that are macros which don't play well with these macros
#if (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY || defined(ARDUINO_ARCH_SAM) || defined(TARGET_LPC1768))
#if SERIAL_PORT == 0 #if SERIAL_PORT == 0
static const char RXD_NAME_0[] PROGMEM = { "RXD0" }; static const char RXD_NAME_0[] PROGMEM = { "RXD0" };
static const char TXD_NAME_0[] PROGMEM = { "TXD0" }; static const char TXD_NAME_0[] PROGMEM = { "TXD0" };
@ -116,6 +116,9 @@ const PinInfo pin_array[] PROGMEM = {
#elif AVR_ATmega1284_FAMILY #elif AVR_ATmega1284_FAMILY
{ RXD_NAME_0, 8, true }, { RXD_NAME_0, 8, true },
{ TXD_NAME_0, 9, true }, { TXD_NAME_0, 9, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_0, 3, true },
{ TXD_NAME_0, 2, true },
#endif #endif
#elif SERIAL_PORT == 1 #elif SERIAL_PORT == 1
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
@ -124,16 +127,25 @@ const PinInfo pin_array[] PROGMEM = {
#elif AVR_ATmega1284_FAMILY #elif AVR_ATmega1284_FAMILY
{ RXD_NAME_1, 10, true }, { RXD_NAME_1, 10, true },
{ TXD_NAME_1, 11, true }, { TXD_NAME_1, 11, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_1, 16, true },
{ TXD_NAME_1, 15, true },
#endif #endif
#elif SERIAL_PORT == 2 #elif SERIAL_PORT == 2
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
{ RXD_NAME_2, 17, true }, { RXD_NAME_2, 17, true },
{ TXD_NAME_2, 16, true }, { TXD_NAME_2, 16, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_2, 11, true },
{ TXD_NAME_2, 10, true },
#endif #endif
#elif SERIAL_PORT == 3 #elif SERIAL_PORT == 3
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
{ RXD_NAME_3, 15, true }, { RXD_NAME_3, 15, true },
{ TXD_NAME_3, 14, true }, { TXD_NAME_3, 14, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_3, 1, true },
{ TXD_NAME_3, 0, true },
#endif #endif
#endif #endif
@ -145,6 +157,9 @@ const PinInfo pin_array[] PROGMEM = {
#elif AVR_ATmega1284_FAMILY #elif AVR_ATmega1284_FAMILY
{ RXD_NAME_0, 8, true }, { RXD_NAME_0, 8, true },
{ TXD_NAME_0, 9, true }, { TXD_NAME_0, 9, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_0, 3, true },
{ TXD_NAME_0, 2, true },
#endif #endif
#elif SERIAL_PORT_2 == 1 #elif SERIAL_PORT_2 == 1
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
@ -153,16 +168,25 @@ const PinInfo pin_array[] PROGMEM = {
#elif AVR_ATmega1284_FAMILY #elif AVR_ATmega1284_FAMILY
{ RXD_NAME_1, 10, true }, { RXD_NAME_1, 10, true },
{ TXD_NAME_1, 11, true }, { TXD_NAME_1, 11, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_1, 16, true },
{ TXD_NAME_1, 15, true },
#endif #endif
#elif SERIAL_PORT_2 == 2 #elif SERIAL_PORT_2 == 2
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
{ RXD_NAME_2, 17, true }, { RXD_NAME_2, 17, true },
{ TXD_NAME_2, 16, true }, { TXD_NAME_2, 16, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_2, 11, true },
{ TXD_NAME_2, 10, true },
#endif #endif
#elif SERIAL_PORT_2 == 3 #elif SERIAL_PORT_2 == 3
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM)) #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
{ RXD_NAME_3, 15, true }, { RXD_NAME_3, 15, true },
{ TXD_NAME_3, 14, true }, { TXD_NAME_3, 14, true },
#elif defined(TARGET_LPC1768)
{ RXD_NAME_3, 1, true },
{ TXD_NAME_3, 0, true },
#endif #endif
#endif #endif
#endif #endif