![]() |
sysmonpsv
Xilinx SDK Drivers API Documentation
|
Macros | |
#define | XSysMonPsv_GetAlarmMask(InstancePtr, Supply) Mask = 1 << (InstancePtr->Supply_List[Supply]/32) |
This macro returns the XSYSMONPSV_NEW_ALARMn_MASK for a configured supply. More... | |
Typedefs | |
typedef void(* | XSysMonPsv_Handler )(void *CallBackRef) |
This data type defines a handler that an application defines to communicate with interrupt system to retrieve state information about an application. More... | |
Enumerations | |
This typedef defines Threshold types. | |
enum | XSysMonPsv_Threshold |
This typedef defines value types for voltage readings. | |
enum | XSysMonPsv_Val { XSYSMONPSV_VAL, XSYSMONPSV_VAL_MIN, XSYSMONPSV_VAL_MAX, XSYSMONPSV_VAL_VREF_MIN, XSYSMONPSV_VAL_VREF_MAX } |
Functions | |
s32 | XSysMonPsv_CfgInitialize (XSysMonPsv *InstancePtr, XSysMonPsv_Config *CfgPtr) |
This function initializes XSysMonPsv device/instance. More... | |
void | XSysMonPsv_SystemReset (XSysMonPsv *InstancePtr) |
This function resets the SystemMonitor. More... | |
void | XSysMonPsv_EnRegGate (XSysMonPsv *InstancePtr, u8 Enable) |
This function Gates the register outputs. More... | |
void | XSysMonPsv_SetPMBusAddress (XSysMonPsv *InstancePtr, u8 Address) |
This function sets the PMBus address for the System Monitor. More... | |
void | XSysMonPsv_PMBusEnable (XSysMonPsv *InstancePtr, u8 Enable) |
This function enables/disbles the PMBus on the System Monitor. More... | |
void | XSysMonPsv_PMBusEnableCmd (XSysMonPsv *InstancePtr, u8 Enable) |
This function restricts or de-restrict all PMBs commands. More... | |
void | XSysMonPsv_SelectExtInterface (XSysMonPsv *InstancePtr, u8 Interface) |
This function selects I2C or PMBus interface to which traffic from SMBus is routed to. More... | |
void | XSysMonPsv_StatusReset (XSysMonPsv *InstancePtr, u8 ResetSupply, u8 ResetTemperature) |
This function Resets the Min and Max values of Supplies and Temperature to negative and positive saturation respectively. More... | |
u16 | XSysMonPsv_ReadDevTempThreshold (XSysMonPsv *InstancePtr, XSysMonPsv_Threshold ThresholdType) |
This function returns the device temperature threshold for min and max values in signed Q8.7 format. More... | |
u16 | XSysMonPsv_ReadOTTempThreshold (XSysMonPsv *InstancePtr, XSysMonPsv_Threshold ThresholdType) |
This function returns the OT temperature threshold for min and max values in signed Q8.7 format. More... | |
u32 | XSysMonPsv_ReadDeviceTemp (XSysMonPsv *InstancePtr, XSysMonPsv_Val Value) |
This function returns the temperature values for the device in signed Q8.7 format. More... | |
u32 | XSysMonPsv_ReadSupplyThreshold (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply, XSysMonPsv_Threshold ThresholdType) |
This function reads the raw value for Supply Threshold. More... | |
u32 | XSysMonPsv_ReadSupplyValue (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply, XSysMonPsv_Val Value) |
This function reads the raw Supply Value for requested. More... | |
u32 | XSysMonPsv_IsNewData (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply) |
This function is to be used to check if new data is available for a supply. More... | |
u32 | XSysMonPsv_IsAlarmCondition (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply) |
This function is to be used to check if the supply value has exceeded the set threshold values. More... | |
void | XSysMonPsv_IntrEnable (XSysMonPsv *InstancePtr, u32 Mask, u8 IntrNum) |
This function enables the specified interrupts in the device. More... | |
void | XSysMonPsv_IntrDisable (XSysMonPsv *InstancePtr, u32 Mask, u8 IntrNum) |
This function disables the specified interrupts in the device. More... | |
u32 | XSysMonPsv_IntrGetEnabled (XSysMonPsv *InstancePtr, u8 IntrNum) |
This function returns the enabled interrupts read from the Interrupt Enable Register (IER). More... | |
u32 | XSysMonPsv_IntrGetStatus (XSysMonPsv *InstancePtr) |
This function returns the interrupt status read from Interrupt Status Register(ISR). More... | |
void | XSysMonPsv_IntrClear (XSysMonPsv *InstancePtr, u32 Mask) |
This function clears the specified interrupts in the Interrupt Status Register (ISR). More... | |
void | XSysMonPsv_SetNewDataIntSrc (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply, u32 Mask) |
This function sets a supply as a source new data interrupt. More... | |
XSysMonPsv_Config * | XSysMonPsv_LookupConfig (void) |
This function looks for the device configuration based on the unique device ID. More... | |
#define XSysMonPsv_GetAlarmMask | ( | InstancePtr, | |
Supply | |||
) | Mask = 1 << (InstancePtr->Supply_List[Supply]/32) |
This macro returns the XSYSMONPSV_NEW_ALARMn_MASK for a configured supply.
Supply | is a type enum of supply enabled |
typedef void(* XSysMonPsv_Handler)(void *CallBackRef) |
This data type defines a handler that an application defines to communicate with interrupt system to retrieve state information about an application.
CallBackRef | is a callback reference passed in by the upper layer when setting the handler, and is passed back to the upper layer when the handler is called. It is used to find the device driver instance. |
enum XSysMonPsv_Val |
s32 XSysMonPsv_CfgInitialize | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Config * | CfgPtr | ||
) |
This function initializes XSysMonPsv device/instance.
This function must be called prior to using the System Monitor device.
InstancePtr | is a pointer to the XSysMonPsv instance. |
CfgPtr | points to the XSysMonPsv device configuration structure. |
Referenced by SysMonPsvIntrExample(), and SysMonPsvPolledExample().
void XSysMonPsv_EnRegGate | ( | XSysMonPsv * | InstancePtr, |
u8 | Enable | ||
) |
This function Gates the register outputs.
InstancePtr | is a pointer to the XSysMonPsv instance. |
References XSYSMONPSV_PCSR_CONTROL, XSYSMONPSV_PCSR_MASK, and XSysMonPsv_WriteReg.
void XSysMonPsv_IntrClear | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask | ||
) |
This function clears the specified interrupts in the Interrupt Status Register (ISR).
InstancePtr | is a pointer to the XSysMonPsv instance. |
Mask | is the 32 bit-mask of the interrupts to be cleared. Bit positions of 1 will be cleared. Bit positions of 0 will not change the previous interrupt status.* |
References XSYSMONPSV_ISR_OFFSET, and XSysMonPsv_WriteReg.
Referenced by SysMonPsvIntrExample(), and SysMonPsvPolledExample().
void XSysMonPsv_IntrDisable | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask, | ||
u8 | IntrNum | ||
) |
This function disables the specified interrupts in the device.
InstancePtr | is a pointer to the XSysMonPsv instance. |
Mask | is the 32 bit-mask of the interrupts to be enabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XSYSMONPSV_IDR_* bits defined in xsysmonpsv_hw.h. |
IntrNum | is the interrupt disable register to be used |
References XSYSMONPSV_IDR0_OFFSET, and XSysMonPsv_WriteReg.
void XSysMonPsv_IntrEnable | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask, | ||
u8 | IntrNum | ||
) |
This function enables the specified interrupts in the device.
InstancePtr | is a pointer to the XSysMonPsv instance. |
Mask | is the 32 bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XSYSMONPSV_IER_* bits defined in xsysmonpsv_hw.h. |
IntrNum | is the interrupt enable register to be used |
References XSYSMONPSV_IER0_OFFSET, and XSysMonPsv_WriteReg.
Referenced by SysMonPsvIntrExample(), and SysMonPsvPolledExample().
u32 XSysMonPsv_IntrGetEnabled | ( | XSysMonPsv * | InstancePtr, |
u8 | IntrNum | ||
) |
This function returns the enabled interrupts read from the Interrupt Enable Register (IER).
Use the XSYSMONPSV_IER0_* and XSYSMONPSV_IER1_* constants defined in xsysmonpsv_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XSysMonPsv instance. |
IntrNum | is the interrupt enable register to be used |
References XSYSMONPSV_IER0_OFFSET, and XSysMonPsv_ReadReg.
u32 XSysMonPsv_IntrGetStatus | ( | XSysMonPsv * | InstancePtr | ) |
This function returns the interrupt status read from Interrupt Status Register(ISR).
Use the XSYSMONPSV_ISR* constants defined in xsysmonpsv_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XSysMonPsv instance. |
References XSYSMONPSV_ISR_OFFSET, and XSysMonPsv_ReadReg.
Referenced by SysMonPsvPolledExample().
u32 XSysMonPsv_IsAlarmCondition | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply | ||
) |
This function is to be used to check if the supply value has exceeded the set threshold values.
InstancePtr | is a pointer to the driver instance. |
Supply | is an enum which indicates the desired supply. |
References XSYSMONPSV_ALARM_FLAG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
u32 XSysMonPsv_IsNewData | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply | ||
) |
This function is to be used to check if new data is available for a supply.
InstancePtr | is a pointer to the driver instance. |
Supply | is an enum which indicates the desired supply. |
References XSYSMONPSV_NEW_DATA_FLAG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
XSysMonPsv_Config* XSysMonPsv_LookupConfig | ( | void | ) |
This function looks for the device configuration based on the unique device ID.
The table XSysmonPsu_ConfigTable[] contains the configuration information for each device in the system.
None. |
Referenced by SysMonPsvIntrExample(), and SysMonPsvPolledExample().
void XSysMonPsv_PMBusEnable | ( | XSysMonPsv * | InstancePtr, |
u8 | Enable | ||
) |
This function enables/disbles the PMBus on the System Monitor.
InstancePtr | is a pointer to the driver instance. |
Enable | is the value which enables or disables the PMBus. |
References XSYSMONPSV_CONFIG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
void XSysMonPsv_PMBusEnableCmd | ( | XSysMonPsv * | InstancePtr, |
u8 | Enable | ||
) |
This function restricts or de-restrict all PMBs commands.
InstancePtr | is a pointer to the driver instance. |
Enable | is the value which restrics or de-restrict the PMBus commands. |
References XSYSMONPSV_CONFIG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
u32 XSysMonPsv_ReadDeviceTemp | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Val | Value | ||
) |
This function returns the temperature values for the device in signed Q8.7 format.
InstancePtr | is a pointer to the driver instance. |
Value | is an enum which indicates the typde of temperature value to be read |
Temp | is a pointer to which the device temperature is written to. |
References XSYSMONPSV_DEVICE_TEMP_MAX, XSYSMONPSV_DEVICE_TEMP_MAX_MAX, XSYSMONPSV_DEVICE_TEMP_MIN, XSYSMONPSV_DEVICE_TEMP_MIN_MIN, XSysMonPsv_ReadReg, XSYSMONPSV_VAL_MAX, XSYSMONPSV_VAL_MIN, XSYSMONPSV_VAL_VREF_MAX, and XSYSMONPSV_VAL_VREF_MIN.
Referenced by SysMonPsvPolledExample().
u16 XSysMonPsv_ReadDevTempThreshold | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Threshold | ThresholdType | ||
) |
This function returns the device temperature threshold for min and max values in signed Q8.7 format.
InstancePtr | is a pointer to the driver instance. |
ThresholdType | is an enum which indicates the type of threshold |
References XSYSMONPSV_DEVICE_TEMP_TH, and XSysMonPsv_ReadReg.
u16 XSysMonPsv_ReadOTTempThreshold | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Threshold | ThresholdType | ||
) |
This function returns the OT temperature threshold for min and max values in signed Q8.7 format.
InstancePtr | is a pointer to the driver instance. |
ThresholdType | is an enum which indicates the type of threshold |
References XSYSMONPSV_OT_TEMP_TH, and XSysMonPsv_ReadReg.
u32 XSysMonPsv_ReadSupplyThreshold | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply, | ||
XSysMonPsv_Threshold | ThresholdType | ||
) |
This function reads the raw value for Supply Threshold.
InstancePtr | is a pointer to the driver instance. |
Supply | is an enum which indicates the desired supply to be read |
ThresholdType | is an enum which indicates the type of threshold |
References XSysMonPsv_ReadReg, XSYSMONPSV_SUPPLY_TH_LOWER, and XSYSMONPSV_SUPPLY_TH_UPPER.
u32 XSysMonPsv_ReadSupplyValue | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply, | ||
XSysMonPsv_Val | Value | ||
) |
This function reads the raw Supply Value for requested.
InstancePtr | is a pointer to the driver instance. |
Supply | is an enum which indicates the desired supply to be read |
Value | is the type of reading for the Supply |
References XSysMonPsv_ReadReg, XSYSMONPSV_SUPPLY, XSYSMONPSV_SUPPLY_MAX, XSYSMONPSV_SUPPLY_MIN, XSYSMONPSV_VAL, and XSYSMONPSV_VAL_MIN.
Referenced by SysMonPsvPolledExample().
void XSysMonPsv_SelectExtInterface | ( | XSysMonPsv * | InstancePtr, |
u8 | Interface | ||
) |
This function selects I2C or PMBus interface to which traffic from SMBus is routed to.
InstancePtr | is a pointer to the driver instance. |
Interface | is a value which determies where the SMBus traffic gets routed to |
References XSYSMONPSV_CONFIG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
void XSysMonPsv_SetNewDataIntSrc | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply, | ||
u32 | Mask | ||
) |
This function sets a supply as a source new data interrupt.
InstancePtr | is a pointer to the XSysMonPsv instance. |
Supply | is an enum from the XSysMonPsv_Supply |
Mask | is a 32 bit Mask for NEW_DATA_n fields in the interrupt registers |
References XSYSMONPSV_NEW_DATA_INT_SRC, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
Referenced by SysMonPsvPolledExample().
void XSysMonPsv_SetPMBusAddress | ( | XSysMonPsv * | InstancePtr, |
u8 | Address | ||
) |
This function sets the PMBus address for the System Monitor.
InstancePtr | is a pointer to the device instance. |
Address | is a value at which the Sysmon will be addressed on the PMBus. |
References XSYSMONPSV_CONFIG0, XSysMonPsv_ReadReg, and XSysMonPsv_WriteReg.
void XSysMonPsv_StatusReset | ( | XSysMonPsv * | InstancePtr, |
u8 | ResetSupply, | ||
u8 | ResetTemperature | ||
) |
This function Resets the Min and Max values of Supplies and Temperature to negative and positive saturation respectively.
InstancePtr | is a pointer to the driver instance. |
ResetSupply | will reset the MIN and MAX values reached by the internal supplies since the last reset. |
ResetTemperature | will reset the MIN and MAX values reached by the device since the last reset. |
References XSYSMONPSV_STATUS_RESET, and XSysMonPsv_WriteReg.
void XSysMonPsv_SystemReset | ( | XSysMonPsv * | InstancePtr | ) |
This function resets the SystemMonitor.
InstancePtr | is a pointer to the XSysMonPsv instance. |
References XSYSMONPSV_PCSR_CONTROL, XSYSMONPSV_PCSR_MASK, and XSysMonPsv_WriteReg.