XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
void XSysMonPsu_SetSequencerEvent(XSysMonPsu *InstancePtr, u32 IsEventMode,
		u32 SysmonBlk)
{
	u32 RegValue;
	UINTPTR EffectiveBaseAddress;

	/* Assert the arguments. */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((IsEventMode == TRUE) || (IsEventMode == FALSE));
	Xil_AssertVoid((SysmonBlk == XSYSMON_PS)||(SysmonBlk == XSYSMON_PL));

	/* Calculate the effective baseaddress based on the Sysmon instance. */
	EffectiveBaseAddress =
			XSysMonPsu_GetEffBaseAddress(InstancePtr->Config.BaseAddress,
					SysmonBlk);

	/* Read the Configuration Register 0. */
	RegValue = XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_CFG_REG0_OFFSET);

	/* Set the ADC mode. */
	if (IsEventMode == 1U) {
		RegValue |= XSYSMONPSU_CFG_REG0_EC_MASK;
	} else {
		RegValue &= ~((u32)XSYSMONPSU_CFG_REG0_EC_MASK);
	}

	XSysmonPsu_WriteReg(EffectiveBaseAddress + XSYSMONPSU_CFG_REG0_OFFSET,
			 RegValue);
}
/****************************************************************************/
/**
*
* The function enables the Event mode or Continuous mode in the sequencer mode.
*
* @param	InstancePtr is a pointer to the XSysMonPsu instance.
* @param	IsEventMode is a boolean parameter that specifies continuous
*		sampling (specify FALSE) or event driven sampling mode (specify
*		TRUE) for the channel.
* @param	SysmonBlk is the value that tells whether it is for PS Sysmon
*       block or PL Sysmon block register region.
*
* @return	None.
*
* @note		None.
*
*****************************************************************************/
The function enables the Event mode or Continuous mode in the sequencer mode.
The function enables the Event mode or Continuous mode in the sequencer mode .
void XSysMonPsu_SetSequencerEvent(XSysMonPsu *InstancePtr, u32 IsEventMode,
		u32 SysmonBlk)
{
	u32 RegValue;
	UINTPTR EffectiveBaseAddress;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((IsEventMode == TRUE) || (IsEventMode == FALSE));
	Xil_AssertVoid((SysmonBlk == XSYSMON_PS)||(SysmonBlk == XSYSMON_PL));
	EffectiveBaseAddress =
			XSysMonPsu_GetEffBaseAddress(InstancePtr->Config.BaseAddress,
					SysmonBlk);
	RegValue = XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_CFG_REG0_OFFSET);
	if (IsEventMode == 1U) {
		RegValue |= XSYSMONPSU_CFG_REG0_EC_MASK;
	} else {
		RegValue &= ~((u32)XSYSMONPSU_CFG_REG0_EC_MASK);
	}
	XSysmonPsu_WriteReg(EffectiveBaseAddress + XSYSMONPSU_CFG_REG0_OFFSET,
			 RegValue);
}
void XSysMonPsu_SetSequencerEvent ( XSysMonPsu * InstancePtr , u32 IsEventMode , u32 SysmonBlk ) { u32 RegValue ; UINTPTR EffectiveBaseAddress ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( ( IsEventMode == TRUE ) || ( IsEventMode == FALSE ) ) ; Xil_AssertVoid ( ( SysmonBlk == XSYSMON_PS ) || ( SysmonBlk == XSYSMON_PL ) ) ; EffectiveBaseAddress = XSysMonPsu_GetEffBaseAddress ( InstancePtr -> Config . BaseAddress , SysmonBlk ) ; RegValue = XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_CFG_REG0_OFFSET ) ; if ( IsEventMode == 1U ) { RegValue |= XSYSMONPSU_CFG_REG0_EC_MASK ; } else { RegValue &= ~ ( ( u32 ) XSYSMONPSU_CFG_REG0_EC_MASK ) ; } XSysmonPsu_WriteReg ( EffectiveBaseAddress + XSYSMONPSU_CFG_REG0_OFFSET , RegValue ) ; }
The function enables the Event mode or Continuous mode in the sequencer mode.
The function enables the Event mode or Continuous mode in the sequencer mode .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /* Read the Configuration Register 0. */ /* Set the ADC mode. */