  * 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;
 }

}

void loop() {
  for (int pin = 0; pin < PINS_COUNT; pin++) {  // For all defined pins
    if (print_pinno(pin)) {  // Does pin exist?

      int bitno = g_APinDescription[pin].ulPin;
      PortGroup *port = digitalPinToPort(pin);
      int pmuxval;

      print_portname(pin);

      if (port->PINCFG[bitno].bit.PMUXEN) {  // Is pinmux enabled?
        // If pinmux is enabled, further report it's value
        if (bitno & 1) {
          // Odd pin numbers
          pmuxval = port->PMUX[bitno / 2].bit.PMUXO;
        } else {
          pmuxval = port->PMUX[bitno / 2].bit.PMUXE;
        }
	print_pinmux(pin, pmuxval);
      } else {
        // Pinmux not enabled - port is GPIO
        PRINT("GPIO ");
        if (port->DIR.reg & (1 << bitno)) { // Decode pinmode (direction.)
          PRINT("O");
        } else {
          PRINT("I");
        }
      } // Pinmux or GPIO
    } // Pin existance
    PRINTLN();
  } // "pin" for loop

  while (mySerial.read() < 0)
    ;  // wait for character to run again.
  PRINTLN("\nRunning again!\n");
}



 * 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,
