XilinxProcessorIPLib/drivers/i2srx/src/xi2srx_intr.c
void XI2s_Rx_IntrHandler(void *InstancePtr)
{
	u32 Data;
	u32 EnableMask;

	/* Convert the non-typed pointer to a XI2s_Rx instance pointer */
	XI2s_Rx *RxPtr = (XI2s_Rx *)InstancePtr;
	/* Verify arguments */
	Xil_AssertVoid(RxPtr != NULL);
	Xil_AssertVoid(RxPtr->IsReady == XIL_COMPONENT_IS_READY);

	/* Read the interrupt status register */
	Data = XI2s_Rx_ReadReg(RxPtr->Config.BaseAddress,
			XI2S_RX_IRQSTS_OFFSET);

	/* Read the interrupt control register */
	EnableMask = XI2s_Rx_ReadReg(RxPtr->Config.BaseAddress,
			XI2S_RX_IRQCTRL_OFFSET);
	/* AES Block Complete Detected */
	if (Data & EnableMask & XI2S_RX_INTR_AES_BLKCMPLT_MASK) {
		/* Clear AES Block Complete event */
		XI2s_Rx_IntrClear(RxPtr, XI2S_RX_INTR_AES_BLKCMPLT_MASK);
		XI2s_Rx_LogWrite(RxPtr, XI2S_RX_AES_BLKCMPLT_EVT, 0);

		/* Call the AES Block Complete Handler */
		if (RxPtr->AesBlkCmpltHandler)
			RxPtr->AesBlkCmpltHandler(RxPtr->AesBlkCmpltRef);
	}
	/* Audio Overflow Detected */
	if (Data & EnableMask & XI2S_RX_INTR_AUDOVRFLW_MASK) {
		/* Clear the Audio Underflow Detected event */
		XI2s_Rx_IntrClear(RxPtr, XI2S_RX_INTR_AUDOVRFLW_MASK);
		XI2s_Rx_LogWrite(RxPtr, XI2S_RX_AUD_OVERFLOW_EVT, 0);

		/* Call the Audio Underflow Detected Handler */
		if (RxPtr->AudOverflowHandler)
			RxPtr->AudOverflowHandler(RxPtr->AudOverflowRef);
	}
}
/*****************************************************************************/
/**
 *
 * This function is the interrupt handler for the XI2s Receiver driver.
 *
 * This handler reads the pending interrupt from the XI2s Receiver peripheral,
 * determines the source of the interrupts, clears the interrupts and calls
 * callbacks accordingly.
 *
 * @param InstancePtr is a pointer to the XI2s_Rx instance.
 *
 * @return None.
 *
 * @note None.
 *
 *****************************************************************************/
This function is the interrupt handler for the XI2s Receiver driver.
This handler reads the pending interrupt from the XI2s Receiver peripheral,
determines the source of the interrupts, clears the interrupts and calls
callbacks accordingly.

@param InstancePtr is a pointer to the XI2s_Rx instance.

@return None.

@note None.
This function is the interrupt handler for the XI2s Receiver driver . This handler reads the pending interrupt from the XI2s Receiver peripheral determines the source of the interrupts clears the interrupts and calls callbacks accordingly . @param InstancePtr is a pointer to the XI2s_Rx instance . @return None . @note None .
void XI2s_Rx_IntrHandler(void *InstancePtr)
{
	u32 Data;
	u32 EnableMask;
	XI2s_Rx *RxPtr = (XI2s_Rx *)InstancePtr;
	Xil_AssertVoid(RxPtr != NULL);
	Xil_AssertVoid(RxPtr->IsReady == XIL_COMPONENT_IS_READY);
	Data = XI2s_Rx_ReadReg(RxPtr->Config.BaseAddress,
			XI2S_RX_IRQSTS_OFFSET);
	EnableMask = XI2s_Rx_ReadReg(RxPtr->Config.BaseAddress,
			XI2S_RX_IRQCTRL_OFFSET);
	if (Data & EnableMask & XI2S_RX_INTR_AES_BLKCMPLT_MASK) {
		XI2s_Rx_IntrClear(RxPtr, XI2S_RX_INTR_AES_BLKCMPLT_MASK);
		XI2s_Rx_LogWrite(RxPtr, XI2S_RX_AES_BLKCMPLT_EVT, 0);
		if (RxPtr->AesBlkCmpltHandler)
			RxPtr->AesBlkCmpltHandler(RxPtr->AesBlkCmpltRef);
	}
	if (Data & EnableMask & XI2S_RX_INTR_AUDOVRFLW_MASK) {
		XI2s_Rx_IntrClear(RxPtr, XI2S_RX_INTR_AUDOVRFLW_MASK);
		XI2s_Rx_LogWrite(RxPtr, XI2S_RX_AUD_OVERFLOW_EVT, 0);
		if (RxPtr->AudOverflowHandler)
			RxPtr->AudOverflowHandler(RxPtr->AudOverflowRef);
	}
}
void XI2s_Rx_IntrHandler ( void * InstancePtr ) { u32 Data ; u32 EnableMask ; XI2s_Rx * RxPtr = ( XI2s_Rx * ) InstancePtr ; Xil_AssertVoid ( RxPtr != NULL ) ; Xil_AssertVoid ( RxPtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Data = XI2s_Rx_ReadReg ( RxPtr -> Config . BaseAddress , XI2S_RX_IRQSTS_OFFSET ) ; EnableMask = XI2s_Rx_ReadReg ( RxPtr -> Config . BaseAddress , XI2S_RX_IRQCTRL_OFFSET ) ; if ( Data & EnableMask & XI2S_RX_INTR_AES_BLKCMPLT_MASK ) { XI2s_Rx_IntrClear ( RxPtr , XI2S_RX_INTR_AES_BLKCMPLT_MASK ) ; XI2s_Rx_LogWrite ( RxPtr , XI2S_RX_AES_BLKCMPLT_EVT , 0 ) ; if ( RxPtr -> AesBlkCmpltHandler ) RxPtr -> AesBlkCmpltHandler ( RxPtr -> AesBlkCmpltRef ) ; } if ( Data & EnableMask & XI2S_RX_INTR_AUDOVRFLW_MASK ) { XI2s_Rx_IntrClear ( RxPtr , XI2S_RX_INTR_AUDOVRFLW_MASK ) ; XI2s_Rx_LogWrite ( RxPtr , XI2S_RX_AUD_OVERFLOW_EVT , 0 ) ; if ( RxPtr -> AudOverflowHandler ) RxPtr -> AudOverflowHandler ( RxPtr -> AudOverflowRef ) ; } }
This function is the interrupt handler for the XI2s Receiver driver.
This function is the interrupt handler for the XI2s Receiver driver .
/* Convert the non-typed pointer to a XI2s_Rx instance pointer */ /* Verify arguments */ /* Read the interrupt status register */ /* Read the interrupt control register */ /* AES Block Complete Detected */ /* Clear AES Block Complete event */ /* Call the AES Block Complete Handler */ /* Audio Overflow Detected */ /* Clear the Audio Underflow Detected event */ /* Call the Audio Underflow Detected Handler */