void WM8731_IO_Ini(void)
{
stc_port_init_t stcPortIni;
/* Enable I2S Peripheral*/
PWC_Fcg1PeriphClockCmd(PWC_FCG1_PERIPH_I2S3, Enable);
/* Initialize i2s port for codec wm8731 recorder function */
MEM_ZERO_STRUCT(stcPortIni);
stcPortIni.enPullUp = Enable;
stcPortIni.enPinDrv = Pin_Drv_H;
PORT_Init(I2S3_CK_PORT, I2S3_CK_PIN, &stcPortIni);
PORT_Init(I2S3_WS_PORT, I2S3_WS_PIN, &stcPortIni);
PORT_Init(I2S3_SD_PORT, I2S3_SD_PIN, &stcPortIni);
PORT_SetFunc(I2S3_CK_PORT, I2S3_CK_PIN, Func_I2s3_Ck, Disable);
PORT_SetFunc(I2S3_WS_PORT, I2S3_WS_PIN, Func_I2s3_Ws, Disable);
PORT_SetFunc(I2S3_SD_IN_PORT, I2S3_SD_IN_PIN, Func_I2s3_Sdin, Disable);
PORT_SetFunc(I2S3_SD_PORT, I2S3_SD_PIN, Func_I2s3_Sd, Disable);
#ifdef EXCK_ON
PORT_Init(I2S3_EXCK_PORT, I2S3_EXCK_PIN, &stcPortIni);
PORT_SetFunc(I2S3_EXCK_PORT, I2S3_EXCK_PIN, Func_I2s, Disable);
#else
PORT_Init(I2S3_MCK_PORT, I2S3_MCK_PIN, &stcPortIni);
PORT_SetFunc(I2S3_MCK_PORT, I2S3_MCK_PIN, Func_I2s, Disable);
#endif
/* Enable I2C Peripheral*/
PWC_Fcg1PeriphClockCmd(PWC_FCG1_PERIPH_I2C2, Enable);
/* Initialize i2c port for codec wm8731 */
PORT_SetFunc(I2C2_SCL_PORT, I2C2_SCL_PIN, Func_I2c2_Scl, Disable);
PORT_SetFunc(I2C2_SDA_PORT, I2C2_SDA_PIN, Func_I2c2_Sda, Disable);
}
EXCK_ON
是个什么含义
|