void Board_Audio_Init(LPC_I2S_T *pI2S, int micIn) { I2S_AUDIO_FORMAT_T I2S_Config; /* Chip_Clock_EnablePeripheralClock(SYSCTL_CLOCK_I2S); */ I2S_Config.SampleRate = 48000; I2S_Config.ChannelNumber = 2; /* 1 is mono, 2 is stereo */ I2S_Config.WordWidth = 16; /* 8, 16 or 32 bits */ Chip_I2S_Init(pI2S); Chip_I2S_TxConfig(pI2S, &I2S_Config); }
/* Board Audio initialization */ void Board_Audio_Init(LPC_I2S_T *pI2S, int micIn) { I2S_AUDIO_FORMAT_T I2S_Config; I2S_Config.SampleRate = 48000; I2S_Config.ChannelNumber = 2; /* 1 is mono, 2 is stereo */ I2S_Config.WordWidth = 16; /* 8, 16 or 32 bits */ Chip_I2S_Init(pI2S); Chip_I2S_TxConfig(pI2S, &I2S_Config); /* Init UDA1380 CODEC */ while (Board_Audio_CodecInit(micIn) != SUCCESS) {} }