  * Print an Arduino pin number, and it's "name."
  * (in particular, check for the Analog pins and label them)
  */
-boolean print_pinno(int i)
+static boolean print_pinno(int i, char *name)
 {
   int pintype = g_APinDescription[i].ulPinType;
   if (pintype == PIO_NOT_A_PIN) {
     return false;
   }
-  PRINT(i);
-  if (i < 10)
-    PRINT(" ");
-  if (pintype == PIO_ANALOG) {  // try to detect and renumber Analog pins.
-    PRINT(" (A");
-    PRINT(i - PIN_A0);
-    PRINT(") ");
+  PRINTN(i);
+  if (name && *name) {
+    PRINTS(" [");
+    PRINTS(name);
+    PRINTS("] ");
+  } else if (pintype == PIO_ANALOG) {  // try to detect and renumber Analog pins.
+    PRINTS(" (A");
+    PRINTN(i - PIN_A0);
+    PRINTS(") ");
   } else {
-    PRINT("      ");
+    PRINTS("      ");
   }
   return true;
 }

 * Tables for SercomALT PMUX value
 */

const char *pin_to_SERCOMALTA_info[] = {
/* PA00 */ "1 P0",
/* PA01 */ "1 P1",
/* PA02 */ nullstr,
/* PA03 */ nullstr,
/* PA04 */ "0 P0",
/* PA05 */ "0 P1",
/* PA06 */ "0 P2",
/* PA07 */ "0 P3",
/* PA08 */ "2 P0",
/* PA09 */ "2 P1",
/* PA10 */ "2 P2",
/* PA11 */ "2 P3",
/* PA12 */ "4 P0",
/* PA13 */ "4 P1",
/* PA14 */ "4 P2",
/* PA15 */ "4 P3",
/* PA16 */ "3 P0",
/* PA17 */ "3 P1",
/* PA18 */ "3 P2",
/* PA19 */ "3 P3",
/* PA20 */ "3 P2",
/* PA21 */ "3 P3",
/* PA22 */ "5 P0",
/* PA23 */ "5 P1",
/* PA24 */ "5 P2",
/* PA25 */ "5 P3",
/* PA26 */ nullstr,
/* PA27 */ nullstr,
/* PA28 */ nullstr,
/* PA29 */ nullstr,
/* PA30 */ "1 P2",
/* PA31 */ "1 P3",
};

const char *pin_to_SERCOMALTB_info[] = {
/* PB00 */ "5 P2",
/* PB01 */ "5 P3",
/* PB02 */ "5 P0",
/* PB03 */ "5 P1",
/* PB04 */ nullstr,
/* PB05 */ nullstr,
/* PB06 */ nullstr,
/* PB07 */ nullstr,
/* PB08 */ "4 P0",
/* PB09 */ "4 P1",
/* PB10 */ "4 P2",
/* PB11 */ "4 P3",
/* PB12 */ nullstr,
/* PB13 */ nullstr,
/* PB14 */ nullstr,
/* PB15 */ nullstr,
/* PB16 */ nullstr,
/* PB17 */ nullstr,
/* PB18 */ nullstr,
/* PB19 */ nullstr,
/* PB20 */ nullstr,
/* PB21 */ nullstr,
/* PB22 */ "5 P2",
/* PB23 */ "5 P3",
/* PB24 */ nullstr,
/* PB25 */ nullstr,
/* PB26 */ nullstr,
/* PB27 */ nullstr,
/* PB28 */ nullstr,
/* PB29 */ nullstr,
/* PB30 */ "5 P0",
/* PB31 */ "5 P1"
};

void decode_SERCOMA(int pin, int pmux)
{
  PortGroup *port = digitalPinToPort(pin);
  int bitno = g_APinDescription[pin].ulPin;
  int sercomno, sercomtype;
  Sercom *s;

  PRINT(pinmux_names[pmux]);
  if (port == &PORT->Group[0]) {
    if (bitno < ARRAYSIZE(pin_to_SERCOMALTA_info)) {
      PRINT(pin_to_SERCOMALTA_info[bitno]);
      /*
       * Get sercom number from the string.  (Ugly, but saves space.)
       */

 * can apply to one of six different SERCOM modules on a SAMD21, and an ANALOG
 * PMUX value could be ADC, REF, DAC, or TouchController.)
 */
static void (*PMUX_decode_func[8])(int, int) = {
  decode_EIC,
  decode_ADC,
  decode_SERCOM,
