XilinxProcessorIPLib/drivers/v_hdmirx/src/xv_hdmirx_intr.c
static void HdmiRx_AuxIntrHandler(XV_HdmiRx *InstancePtr)
{
    u32 Status;
    u8 Index;

    /* Read Status register */
    Status = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET));

    /* Check for GCP colordepth event */
    if ((Status) & (XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK)) {
    	/* Clear event flag */
    	XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK));

    	if ((Status) & (XV_HDMIRX_AUX_STA_GCP_MASK)) {
    		InstancePtr->Stream.Video.ColorDepth = XV_HdmiRx_GetGcpColorDepth(InstancePtr);
    	}
    }

    /* Check for new packet */
    if ((Status) & (XV_HDMIRX_AUX_STA_NEW_MASK)) {
        // Clear event flag
        XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_NEW_MASK));

        /* Set HDMI flag */
        InstancePtr->Stream.IsHdmi = (TRUE);

        /* Read header word and update AUX header field */
        InstancePtr->Aux.Header.Data = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_DAT_OFFSET));

        for (Index = 0x0; Index < 8; Index++) {
            /* Read data word and update AUX data field */
            InstancePtr->Aux.Data.Data[Index] = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_DAT_OFFSET));
        }

        /* Callback */
        if (InstancePtr->IsAuxCallbackSet) {
            InstancePtr->AuxCallback(InstancePtr->AuxRef);
        }
    }

    /* Link integrity check */
    if ((Status) & (XV_HDMIRX_AUX_STA_ERR_MASK)) {
		XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_ERR_MASK));

        /* Callback */
        if (InstancePtr->IsLinkErrorCallbackSet) {
			InstancePtr->LinkErrorCallback(InstancePtr->LinkErrorRef);
		}
	}
}
/*****************************************************************************/
/**
*
* This function is the interrupt handler for the HDMI RX AUX peripheral.
*
* @param    InstancePtr is a pointer to the XV_HdmiRx core instance.
*
* @return   None.
*
* @note     None.
*
******************************************************************************/
This function is the interrupt handler for the HDMI RX AUX peripheral.
This function is the interrupt handler for the HDMI RX AUX peripheral .
static void HdmiRx_AuxIntrHandler(XV_HdmiRx *InstancePtr)
{
    u32 Status;
    u8 Index;
    Status = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET));
    if ((Status) & (XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK)) {
    	XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK));
    	if ((Status) & (XV_HDMIRX_AUX_STA_GCP_MASK)) {
    		InstancePtr->Stream.Video.ColorDepth = XV_HdmiRx_GetGcpColorDepth(InstancePtr);
    	}
    }
    if ((Status) & (XV_HDMIRX_AUX_STA_NEW_MASK)) {
        XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_NEW_MASK));
        InstancePtr->Stream.IsHdmi = (TRUE);
        InstancePtr->Aux.Header.Data = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_DAT_OFFSET));
        for (Index = 0x0; Index < 8; Index++) {
            InstancePtr->Aux.Data.Data[Index] = XV_HdmiRx_ReadReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_DAT_OFFSET));
        }
        if (InstancePtr->IsAuxCallbackSet) {
            InstancePtr->AuxCallback(InstancePtr->AuxRef);
        }
    }
    if ((Status) & (XV_HDMIRX_AUX_STA_ERR_MASK)) {
		XV_HdmiRx_WriteReg(InstancePtr->Config.BaseAddress, (XV_HDMIRX_AUX_STA_OFFSET), (XV_HDMIRX_AUX_STA_ERR_MASK));
        if (InstancePtr->IsLinkErrorCallbackSet) {
			InstancePtr->LinkErrorCallback(InstancePtr->LinkErrorRef);
		}
	}
}
static void HdmiRx_AuxIntrHandler ( XV_HdmiRx * InstancePtr ) { u32 Status ; u8 Index ; Status = XV_HdmiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_STA_OFFSET ) ) ; if ( ( Status ) & ( XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK ) ) { XV_HdmiRx_WriteReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_STA_OFFSET ) , ( XV_HDMIRX_AUX_STA_GCP_CD_EVT_MASK ) ) ; if ( ( Status ) & ( XV_HDMIRX_AUX_STA_GCP_MASK ) ) { InstancePtr -> Stream . Video . ColorDepth = XV_HdmiRx_GetGcpColorDepth ( InstancePtr ) ; } } if ( ( Status ) & ( XV_HDMIRX_AUX_STA_NEW_MASK ) ) { XV_HdmiRx_WriteReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_STA_OFFSET ) , ( XV_HDMIRX_AUX_STA_NEW_MASK ) ) ; InstancePtr -> Stream . IsHdmi = ( TRUE ) ; InstancePtr -> Aux . Header . Data = XV_HdmiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_DAT_OFFSET ) ) ; for ( Index = 0x0 ; Index < 8 ; Index ++ ) { InstancePtr -> Aux . Data . Data [ Index ] = XV_HdmiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_DAT_OFFSET ) ) ; } if ( InstancePtr -> IsAuxCallbackSet ) { InstancePtr -> AuxCallback ( InstancePtr -> AuxRef ) ; } } if ( ( Status ) & ( XV_HDMIRX_AUX_STA_ERR_MASK ) ) { XV_HdmiRx_WriteReg ( InstancePtr -> Config . BaseAddress , ( XV_HDMIRX_AUX_STA_OFFSET ) , ( XV_HDMIRX_AUX_STA_ERR_MASK ) ) ; if ( InstancePtr -> IsLinkErrorCallbackSet ) { InstancePtr -> LinkErrorCallback ( InstancePtr -> LinkErrorRef ) ; } } }
This function is the interrupt handler for the HDMI RX AUX peripheral.
This function is the interrupt handler for the HDMI RX AUX peripheral .
/* Read Status register */ /* Check for GCP colordepth event */ /* Clear event flag */ /* Check for new packet */ // Clear event flag /* Set HDMI flag */ /* Read header word and update AUX header field */ /* Read data word and update AUX data field */ /* Callback */ /* Link integrity check */ /* Callback */