lib/sw_services/xilplmi/src/xplmi_err.c
int XPlmi_CheckNpiErrors(void)
{
	int Status = XST_FAILURE;
	u32 ErrVal;
	u32 IsrVal = XPlmi_In32(NPI_NIR_REG_ISR);
	u32 ErrTypeVal = XPlmi_In32(NPI_NIR_ERR_TYPE);
	u32 ErrLogP0Info0Val = XPlmi_In32(NPI_NIR_ERR_LOG_P0_INFO_0);
	u32 ErrLogP0Info1Val = XPlmi_In32(NPI_NIR_ERR_LOG_P0_INFO_1);

	ErrVal =  IsrVal & NPI_NIR_REG_ISR_ERR_MASK;
	ErrVal |= ErrTypeVal & NPI_NIR_ERR_TYPE_ERR_MASK;
	if (ErrVal != 0U) {
		XPlmi_Printf(DEBUG_GENERAL, "NPI_NIR_ISR: 0x%08x\n\r"
			"NPI_NIR_ERR_TYPE: 0x%08x\n\r"
			"NPI_NIR_ERR_LOG_P0_INFO_0: 0x%08x\n\r"
			"NPI_NIR_ERR_LOG_P0_INFO_1: 0x%08x\n\r",
			IsrVal, ErrTypeVal, ErrLogP0Info0Val, ErrLogP0Info1Val);
	}
	else {
		Status = XST_SUCCESS;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function clears NPI errors.
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
******************************************************************************/
@brief       This function clears NPI errors.
@return      XST_SUCCESS on success and error code on failure
@brief This function clears NPI errors . @return XST_SUCCESS on success and error code on failure
int XPlmi_CheckNpiErrors(void)
{
	int Status = XST_FAILURE;
	u32 ErrVal;
	u32 IsrVal = XPlmi_In32(NPI_NIR_REG_ISR);
	u32 ErrTypeVal = XPlmi_In32(NPI_NIR_ERR_TYPE);
	u32 ErrLogP0Info0Val = XPlmi_In32(NPI_NIR_ERR_LOG_P0_INFO_0);
	u32 ErrLogP0Info1Val = XPlmi_In32(NPI_NIR_ERR_LOG_P0_INFO_1);
	ErrVal =  IsrVal & NPI_NIR_REG_ISR_ERR_MASK;
	ErrVal |= ErrTypeVal & NPI_NIR_ERR_TYPE_ERR_MASK;
	if (ErrVal != 0U) {
		XPlmi_Printf(DEBUG_GENERAL, "NPI_NIR_ISR: 0x%08x\n\r"
			"NPI_NIR_ERR_TYPE: 0x%08x\n\r"
			"NPI_NIR_ERR_LOG_P0_INFO_0: 0x%08x\n\r"
			"NPI_NIR_ERR_LOG_P0_INFO_1: 0x%08x\n\r",
			IsrVal, ErrTypeVal, ErrLogP0Info0Val, ErrLogP0Info1Val);
	}
	else {
		Status = XST_SUCCESS;
	}
	return Status;
}
int XPlmi_CheckNpiErrors ( void ) { int Status = XST_FAILURE ; u32 ErrVal ; u32 IsrVal = XPlmi_In32 ( NPI_NIR_REG_ISR ) ; u32 ErrTypeVal = XPlmi_In32 ( NPI_NIR_ERR_TYPE ) ; u32 ErrLogP0Info0Val = XPlmi_In32 ( NPI_NIR_ERR_LOG_P0_INFO_0 ) ; u32 ErrLogP0Info1Val = XPlmi_In32 ( NPI_NIR_ERR_LOG_P0_INFO_1 ) ; ErrVal = IsrVal & NPI_NIR_REG_ISR_ERR_MASK ; ErrVal |= ErrTypeVal & NPI_NIR_ERR_TYPE_ERR_MASK ; if ( ErrVal != 0U ) { XPlmi_Printf ( DEBUG_GENERAL , " \n \r " " \n \r " " \n \r " " \n \r " , IsrVal , ErrTypeVal , ErrLogP0Info0Val , ErrLogP0Info1Val ) ; } else { Status = XST_SUCCESS ; } return Status ; }
@brief       This function clears NPI errors.
@brief This function clears NPI errors .