XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
void XSysMon_SetTempWaitCycles(XSysMon *InstancePtr, u16 WaitCycles)
{
	u32 RegVal;
	/*
	 * Assert the arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);


	RegVal = ((InstancePtr->Mask) & ~(XSM_CONVST_WAITCYCLES_MASK)) ;

	RegVal = (WaitCycles << XSM_CONVST_WAITCYCLES_SHIFT) | RegVal;

	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
				XSM_CONVST_OFFSET, RegVal);

	/* Store the written value in Mask */
	InstancePtr->Mask = RegVal;
}
/****************************************************************************/
/**
*
* This function sets the number of Wait Cycles for Temperature updation logic
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	WaitCycles is number of wait cycles
*
* @return	None.
*
* @note		The default number of wait cycles are 1000(0x3E8).
*
*****************************************************************************/
This function sets the number of Wait Cycles for Temperature updation logic
This function sets the number of Wait Cycles for Temperature updation logic
void XSysMon_SetTempWaitCycles(XSysMon *InstancePtr, u16 WaitCycles)
{
	u32 RegVal;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	RegVal = ((InstancePtr->Mask) & ~(XSM_CONVST_WAITCYCLES_MASK)) ;
	RegVal = (WaitCycles << XSM_CONVST_WAITCYCLES_SHIFT) | RegVal;
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
				XSM_CONVST_OFFSET, RegVal);
	InstancePtr->Mask = RegVal;
}
void XSysMon_SetTempWaitCycles ( XSysMon * InstancePtr , u16 WaitCycles ) { u32 RegVal ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; RegVal = ( ( InstancePtr -> Mask ) & ~ ( XSM_CONVST_WAITCYCLES_MASK ) ) ; RegVal = ( WaitCycles << XSM_CONVST_WAITCYCLES_SHIFT ) | RegVal ; XSysMon_WriteReg ( InstancePtr -> Config . BaseAddress , XSM_CONVST_OFFSET , RegVal ) ; InstancePtr -> Mask = RegVal ; }
This function sets the number of Wait Cycles for Temperature updation logic
This function sets the number of Wait Cycles for Temperature updation logic
/*
	 * Assert the arguments.
	 */ /* Store the written value in Mask */