XilinxProcessorIPLib/drivers/prc/src/xprc.c
u8 XPrc_IsSwTriggerPending(XPrc *InstancePtr, u16 VsmId, u16 *TriggerId)
{
	u32 Address;
	u32 Data = 0;

	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid(VsmId < XPRC_MAX_NUMBER_OF_VSMS);

	Address = XPrc_GetRegisterAddress(InstancePtr, VsmId,
			XPRC_SW_TRIGGER_REG, XPRC_REG_TABLE_ROW);
	Data = XPrc_ReadReg(Address);

	if (TriggerId != NULL) {
		*TriggerId = Data & XPRC_SW_TRIGGER_ID_MASK;
	}

	return (Data & XPRC_SW_TRIGGER_PENDING_MASK) ? XPRC_SW_TRIGGER_PENDING
			: XPRC_NO_SW_TRIGGER_PENDING;
}
/*****************************************************************************/
/**
*
* This function is used to find out if there is a Software Trigger pending
* in a VSM.
*
* @param	InstancePtr is a pointer to the PRC instance.
* @param	VsmId is the identifier of the VSM to access.
* @param	TriggerId is a pointer to a variable that will hold the trigger
*		ID that's in the register. This is the last trigger written
*		to the register and may or may not still be pending.
*
* @return
*		- XPRC_SW_TRIGGER_PENDING(1) if software trigger is pending
*		- XPRC_NO_SW_TRIGGER_PENDING(0) if software trigger is not
*		  pending.
*
* @note		None.
*
******************************************************************************/
This function is used to find out if there is a Software Trigger pending
in a VSM.
This function is used to find out if there is a Software Trigger pending in a VSM .
u8 XPrc_IsSwTriggerPending(XPrc *InstancePtr, u16 VsmId, u16 *TriggerId)
{
	u32 Address;
	u32 Data = 0;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid(VsmId < XPRC_MAX_NUMBER_OF_VSMS);
	Address = XPrc_GetRegisterAddress(InstancePtr, VsmId,
			XPRC_SW_TRIGGER_REG, XPRC_REG_TABLE_ROW);
	Data = XPrc_ReadReg(Address);
	if (TriggerId != NULL) {
		*TriggerId = Data & XPRC_SW_TRIGGER_ID_MASK;
	}
	return (Data & XPRC_SW_TRIGGER_PENDING_MASK) ? XPRC_SW_TRIGGER_PENDING
			: XPRC_NO_SW_TRIGGER_PENDING;
}
u8 XPrc_IsSwTriggerPending ( XPrc * InstancePtr , u16 VsmId , u16 * TriggerId ) { u32 Address ; u32 Data = 0 ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( VsmId < XPRC_MAX_NUMBER_OF_VSMS ) ; Address = XPrc_GetRegisterAddress ( InstancePtr , VsmId , XPRC_SW_TRIGGER_REG , XPRC_REG_TABLE_ROW ) ; Data = XPrc_ReadReg ( Address ) ; if ( TriggerId != NULL ) { * TriggerId = Data & XPRC_SW_TRIGGER_ID_MASK ; } return ( Data & XPRC_SW_TRIGGER_PENDING_MASK ) ? XPRC_SW_TRIGGER_PENDING : XPRC_NO_SW_TRIGGER_PENDING ; }
This function is used to find out if there is a Software Trigger pending
in a VSM.
This function is used to find out if there is a Software Trigger pending in a VSM .