i2srx
Xilinx SDK Drivers API Documentation
xi2srx_intr_example.c File Reference

Overview

This file contains a example for using the I2S receiver hardware device and I2S receiver driver using interrupt mode.This example assumes that the interrupt controller is also present as a part of the system.

 MODIFICATION HISTORY:
Ver     Who     Date            Changes

1.0 kar 01/25/18 First release
 

Functions

int I2sRxIntrExample (INTC *IntcInstancePtr, XI2s_Rx *I2sRxInstancePtr, u16 DeviceId, u16 IntrId)
 This function does a minimal test on the I2S receiver device and driver as a design example. More...
 
void I2sRxDisableIntr (INTC *IntcInstancePtr, u16 IntrId)
 This function disables the interrupts for the I2S receiver. More...
 
void I2sRxAesBlockCmplIntrHandler (void *CallBackRef)
 This function is the handler which performs processing for the I2S receiver. More...
 
void I2sRxOvrflwIntrHandler (void *CallBackRef)
 This function is the handler which performs processing for the I2S receiver. More...
 
int main (void)
 This function is the main function of the I2S receiver example using Interrupts. More...
 

Function Documentation

◆ I2sRxAesBlockCmplIntrHandler()

void I2sRxAesBlockCmplIntrHandler ( void *  CallBackRef)

This function is the handler which performs processing for the I2S receiver.

It is called from an interrupt context when the I2S receiver receives a AES Block Complete Interrupt.

This handler provides an example of how to handle I2S receiver interrupts but is application specific.

Parameters
CallBackRefis a pointer to the callback function
Returns
None.
Note
None.

◆ I2sRxDisableIntr()

void I2sRxDisableIntr ( INTC *  IntcInstancePtr,
u16  IntrId 
)

This function disables the interrupts for the I2S receiver.

Parameters
IntcInstancePtris a reference to the Interrupt Controller driver Instance.
IntrIdis XPAR_<INTC_instance>_<i2s_rx_instance>_VEC_ID value from xparameters.h.
Returns
None.
Note
None.

◆ I2sRxIntrExample()

int I2sRxIntrExample ( INTC *  IntcInstancePtr,
XI2s_Rx I2sRxInstancePtr,
u16  DeviceId,
u16  IntrId 
)

This function does a minimal test on the I2S receiver device and driver as a design example.

The purpose of this function is to illustrate how to use the XI2s_Rx component. It initializes a I2S receiver and then sets it up such that a periodic interrupt is generated.

This function uses interrupt driven mode of the I2S receiver.

Parameters
IntcInstancePtris a pointer to the Interrupt Controller driver Instance
I2sRxInstancePtris a pointer to the XI2s_Rx driver Instance
DeviceIdis the XPAR_<i2s_rx_instance>_DEVICE_ID value from xparameters.h
IntrIdis XPAR_<INTC_instance>_<i2s_rx_instance>_INTERRUPT_INTR value from xparameters.h
Returns
XST_SUCCESS if the Test is successful, otherwise XST_FAILURE

Referenced by main().

◆ I2sRxOvrflwIntrHandler()

void I2sRxOvrflwIntrHandler ( void *  CallBackRef)

This function is the handler which performs processing for the I2S receiver.

It is called from an interrupt context when the I2S receiver receives a Underflow Interrupt.

This handler provides an example of how to handle I2S receiver interrupts but is application specific.

Parameters
CallBackRefis a pointer to the callback function
Returns
None.
Note
None.

◆ main()

int main ( void  )

This function is the main function of the I2S receiver example using Interrupts.

Parameters
None.
Returns
XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.
Note
None.

References I2sRxIntrExample().