brtaylor
Well-known member
Some notes regarding analog - this seems like it's defined in analog.c, static const uint8_t pin2sc1a[], which is an array where the index is the pin number and the stored value refers to the ADC channel number. For example, PTB2 is A5 and the array stores value 12, which is a reference to the channel ADC0_SE12 in the reference manual.