Hi TSMotter,
The pin configurations for the SAMD21G18A are stored in the "variant.h" and "variant.cpp files.
These are located (on my Windows PC at least) at:
C:\Users\Computer\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.18\variants\arduino_zero...
To configure additional Arduino digital and analog pins you need modify the g_APinDescription[] array in the variant.cpp file. This file also configures the available timers: TCC0, TCC1, etc...
The pin assignments of the SPI/I2C/Serial sercom (serial communciation) modules are defined in the "variant.h" file.
For example to assign additional pins to the larger 64-pin SAMD21J18A to the "variant.cpp" file, I just appended them to end of the g_APinDescription[] array and also added the additional TC6 and TC7 timers:
// SAMD21J18A Pins...
// 44..47 - Analog pins
{ PORTB, 4, PIO_ANALOG, 0, ADC_Channel12, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_4 }, // ADC/AIN[12]
{ PORTB, 5, PIO_ANALOG, 0, ADC_Channel13, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_5 }, // ADC/AIN[13]
{ PORTB, 6, PIO_ANALOG, 0, ADC_Channel14, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_6 }, // ADC/AIN[14]
{ PORTB, 7, PIO_ANALOG, 0, ADC_Channel15, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_7 }, // ADC/AIN[15]
// 48..51 - Digital pins
{ PORTB, 12, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_12 },
{ PORTB, 13, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_13 },
{ PORTB, 14, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_14 },
{ PORTB, 15, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_15 },
// 52..53 - SERCOM/UART (Serial1)
{ PORTB, 16, PIO_SERCOM, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_0 }, // TX: SERCOM5/PAD[0]
{ PORTB, 17, PIO_SERCOM, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_1 }, // RX: SERCOM5/PAD[1]
// 54..55 - Digital pins
{ PORTB, 30, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_14 },
{ PORTB, 31, PIO_DIGITAL, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_15 },
// 56..57 - Analog pins
{ PORTB, 0, PIO_ANALOG, 0, ADC_Channel8, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_0 }, // ADC/AIN[8]
{ PORTB, 1, PIO_ANALOG, 0, ADC_Channel9, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_1 }, // ADC/AIN[9]
// 58..59 - SERCOM/UART (Serial2)
{ PORTA, 12, PIO_SERCOM, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_12 }, // TX: SERCOM2/PAD[0]
{ PORTA, 13, PIO_SERCOM, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_13 }, // RX: SERCOM2/PAD[1]
} ;
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5, TC6, TC7 } ;