6.5.1 SSC I/O Pin Initialization
PIO pins PA14 (TK), PA15 (TF) and PA16 (TD) with their peripheral function B will be assigned to the SSC1’s transmitter interface. The code snippet below will initialize the I/O pins accordingly.
/* Set PORTA mask register bit 14 & 15 */
PIOA->PIO_IO_GROUP[0].PIO_MSKR = (3u << 14);
/* Enable peripheral function B and set I/O pin as input */
PIOA->PIO_IO_GROUP[0].PIO_CFGR = PIO_CFGR_FUNC_PERIPH_B | PIO_CFGR_DIR_INPUT;
/* Set PORTA mask register bits 16 */
PIOA->PIO_IO_GROUP[0].PIO_MSKR = (1u << 16);
/* Enable peripheral function B and set I/O pins as output */
PIOA->PIO_IO_GROUP[0].PIO_CFGR = PIO_CFGR_FUNC_PERIPH_B | PIO_CFGR_DIR_OUTPUT;
