void main() { IRQ_setVecs((Uint32)&VECSTART); IRQ_clearAll(); ... uartInit(9600); // initializes uart i2sInit(); // initializes i2s interface IRQ_globalEnable(); for (;;) { } } void uartInit (Uint32 baud) { CSL_UartIsrAddr isrAddr; mySetup.clkInput = getSysClk(); mySetup.baud = baud; UART_init(&uartObj,CSL_UART_INST_0,UART_INTERRUPT); // create handle hUart = (CSL_UartHandle)(&uartObj); UART_setup(hUart,&mySetup); // config uart using setup structur isrAddr.rbiAddr = uart_rxIsr; IRQ_plug (UART_EVENT, &UART_intrDispatch); // config interrupt IRQ_enable(UART_EVENT); // enable interrupt UART_setCallback(hUart,&isrAddr); UART_eventEnable(hUart, CSL_UART_RECVOR_REG_DATA_INTERRUPT); } void i2sInit (void) { I2S_Config hwConfig; CSL_IRQ_Config config; /* Set the value for the configure structure */ hwConfig.dataType = I2S_STEREO_ENABLE; hwConfig.loopBackMode = I2S_LOOPBACK_DISABLE; hwConfig.fsPol = I2S_FSPOL_LOW; hwConfig.clkPol = I2S_RISING_EDGE; hwConfig.datadelay = I2S_DATADELAY_ONEBIT; hwConfig.datapack = I2S_DATAPACK_ENABLE; hwConfig.signext = I2S_SIGNEXT_DISABLE; hwConfig.wordLen = I2S_WORDLEN_32; hwConfig.i2sMode = I2S_SLAVE; hwConfig.FError = I2S_FSERROR_ENABLE; hwConfig.OuError = I2S_OUERROR_ENABLE; i2sHandle = I2S_open(I2S_INSTANCE2, I2S_INTERRUPT, I2S_CHAN_STEREO); I2S_setup(i2sHandle, &hwConfig); I2S_transEnable(i2sHandle, TRUE); config.funcAddr = &i2s_rxIsr; IRQ_plug(RCV2_EVENT , config.funcAddr); IRQ_enable(RCV2_EVENT); }