XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
void XSysMon_SetOverTemp(XSysMon *InstancePtr, u16 Value)
{
	u16 OtUpper;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(Value <= XSM_ATR_OT_UPPER_VAL_MAX);

	/*
	 * Read the OT Upper Alarm Threshold Register.
	 */
	OtUpper = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
					XSM_ATR_OT_UPPER_OFFSET);
	OtUpper &= ~(XSM_ATR_OT_UPPER_VAL_MASK);

	/*
	 * Preserve the OT enable value and write the powerdown value into the
	 * OT Upper Alarm Threshold Register.
	 */
	Value = (Value << XSM_ATR_OT_UPPER_VAL_SHIFT) | OtUpper;
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
			 XSM_ATR_OT_UPPER_OFFSET, Value);
}
/****************************************************************************/
/**
*
* This function sets the powerdown temperature for the OverTemp signal in the
* OT Powerdown register.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	Value is the 16-bit OT Upper Alarm Register powerdown value.
*		Valid values are 0 to 0x0FFF.
*
* @return	None.
*
* @note		This API has been deprecated. Use XSysMon_SetAlarmThreshold(),
*		instead.
*		This API should be used only with V6/7 Series since the
*		upper threshold of OverTemp is programmable in in only V6
*		SysMon/7 Series and Zynq XADC.
*
*****************************************************************************/
This function sets the powerdown temperature for the OverTemp signal in the
OT Powerdown register.
This function sets the powerdown temperature for the OverTemp signal in the OT Powerdown register .
void XSysMon_SetOverTemp(XSysMon *InstancePtr, u16 Value)
{
	u16 OtUpper;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(Value <= XSM_ATR_OT_UPPER_VAL_MAX);
	OtUpper = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
					XSM_ATR_OT_UPPER_OFFSET);
	OtUpper &= ~(XSM_ATR_OT_UPPER_VAL_MASK);
	Value = (Value << XSM_ATR_OT_UPPER_VAL_SHIFT) | OtUpper;
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
			 XSM_ATR_OT_UPPER_OFFSET, Value);
}
void XSysMon_SetOverTemp ( XSysMon * InstancePtr , u16 Value ) { u16 OtUpper ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( Value <= XSM_ATR_OT_UPPER_VAL_MAX ) ; OtUpper = ( u16 ) XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_ATR_OT_UPPER_OFFSET ) ; OtUpper &= ~ ( XSM_ATR_OT_UPPER_VAL_MASK ) ; Value = ( Value << XSM_ATR_OT_UPPER_VAL_SHIFT ) | OtUpper ; XSysMon_WriteReg ( InstancePtr -> Config . BaseAddress , XSM_ATR_OT_UPPER_OFFSET , Value ) ; }
This function sets the powerdown temperature for the OverTemp signal in the
OT Powerdown register.
This function sets the powerdown temperature for the OverTemp signal in the OT Powerdown register .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the OT Upper Alarm Threshold Register.
	 */ /*
	 * Preserve the OT enable value and write the powerdown value into the
	 * OT Upper Alarm Threshold Register.
	 */