5.5.2.1 I2SC I/O Pin Initialization
PIO pins PC1 (I2SCK), PC3 (I2SWS) and PC5 (I2SDO) with peripheral function E will be assigned to the I2SC0 interface. The code snippet given below will initialize the I/O pins accordingly.
/* Set PORTC mask register bits 1 & 3 */
PIOA->PIO_IO_GROUP[2].PIO_MSKR = (0x5 << 1);
/* Enable peripheral function E and set I/O pins as output */
PIOA->PIO_IO_GROUP[2].PIO_CFGR = PIO_CFGR_FUNC_PERIPH_E | PIO_CFGR_DIR_INPUT;
/* Set PORTC mask register bit 5 */
PIOA->PIO_IO_GROUP[2].PIO_MSKR = (0x1 << 5);
/* Enable peripheral function E and set I/O pins as output */
PIOA->PIO_IO_GROUP[2].PIO_CFGR = PIO_CFGR_FUNC_PERIPH_E | PIO_CFGR_DIR_OUTPUT;
