sysmonpsv
Vitis Drivers API Documentation
|
Functions | |
int | XSysMonPsv_TempOffset (XSysMonPsv_TempType Type) |
This function gives the register offset for the different type. More... | |
int | XSysMonPsv_TempThreshOffset (XSysMonPsv_TempEvt Event, XSysMonPsv_EventDir Dir, u32 *Offset) |
This function gives the temperature threshold (upper or lower) offset. More... | |
u32 | XSysMonPsv_SupplyOffset (XSysMonPsv *InstancePtr, int Supply) |
This function gives the supply offset. More... | |
u32 | XSysMonPsv_SupplyThreshOffset (XSysMonPsv *InstancePtr, int Supply, XSysMonPsv_EventDir Dir) |
This function gives the supply threshold (upper or lower) offset. More... | |
void | XSysMonPsv_Q8P7ToCelsius (u32 RawData, int *Val, int *Val2) |
This function converts Q8P7 To Celsius. More... | |
void | XSysMonPsv_CelsiusToQ8P7 (u32 *RawData, int Val, int Val2) |
This function converts Celsius To Q8P7. More... | |
void | XSysMonPsv_SupplyRawToProcessed (int RawData, int *Val, int *Val2) |
This function converts raw data to processed. More... | |
void | XSysMonPsv_SupplyProcessedToRaw (int Val, int Val2, u32 RegVal, u32 *RawData) |
This function converts processed data to raw. More... | |
u32 | XSysMonPsv_IsAlarmPresent (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply) |
This function is to be used to check if the supply value has exceeded the set threshold values. More... | |
u32 | XSysMonPsv_ClearAlarm (XSysMonPsv *InstancePtr, XSysMonPsv_Supply Supply) |
This function is to be used to clear alarm status. More... | |
int | XSysMonPsv_InterruptEnable (XSysMonPsv *InstancePtr, u32 Mask, u8 IntrNum) |
This function enables the specified interrupts in the device. More... | |
int | XSysMonPsv_InterruptDisable (XSysMonPsv *InstancePtr, u32 Mask, u8 IntrNum) |
This function disables the specified interrupts in the device. More... | |
int | XSysMonPsv_InterruptGetStatus (XSysMonPsv *InstancePtr, u32 *IntrStatus) |
This function returns the interrupt status read from Interrupt Status Register(ISR). More... | |
void | XSysMonPsv_InterruptClear (XSysMonPsv *InstancePtr, u32 Mask) |
This function clears the specified interrupts in the Interrupt Status Register (ISR). More... | |
void | XSysMonPsv_UnlockRegspace (XSysMonPsv *InstancePtr) |
This function unlocks the register space of InstancePtr hardware. More... | |
void XSysMonPsv_CelsiusToQ8P7 | ( | u32 * | RawData, |
int | Val, | ||
int | Val2 | ||
) |
This function converts Celsius To Q8P7.
RawData | is Raw Temperature Data. |
Val | is the numerator for covnersion to deg C. |
Val2 | is the denominator for conversion to deg C in Q8.7 format. |
u32 XSysMonPsv_ClearAlarm | ( | XSysMonPsv * | InstancePtr, |
XSysMonPsv_Supply | Supply | ||
) |
This function is to be used to clear alarm status.
InstancePtr | is a pointer to the driver instance. |
Supply | is an enum which indicates the desired supply. |
References XSysMonPsv::Config, XSysMonPsv_Config::Supply_List, XSYSMONPSV_ALARM_FLAG0, XSYSMONPSV_INVALID, XSYSMONPSV_INVALID_SUPPLY, XSysMonPsv_ReadReg32(), and XSysMonPsv_WriteReg32().
void XSysMonPsv_InterruptClear | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask | ||
) |
This function clears the specified interrupts in the Interrupt Status Register (ISR).
InstancePtr | is a pointer to the struct InstancePtr. |
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_WriteReg32().
int XSysMonPsv_InterruptDisable | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask, | ||
u8 | IntrNum | ||
) |
This function disables the specified interrupts in the device.
InstancePtr | is a pointer to the driver 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 InstancePtr.h. |
IntrNum | is the interrupt disable register to be used |
References XSYSMONPSV_IDR0_OFFSET, XSYSMONPSV_PCSR_LOCK, and XSysMonPsv_WriteReg32().
int XSysMonPsv_InterruptEnable | ( | XSysMonPsv * | InstancePtr, |
u32 | Mask, | ||
u8 | IntrNum | ||
) |
This function enables the specified interrupts in the device.
InstancePtr | is a pointer to the driver 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 XSYSMON_IER_* bits defined in InstancePtr.h. |
IntrNum | is the interrupt enable register to be used |
References XSYSMONPSV_IER0_OFFSET, XSYSMONPSV_PCSR_LOCK, and XSysMonPsv_WriteReg32().
Referenced by XSysMonPsv_EnableVoltageEvents().
int XSysMonPsv_InterruptGetStatus | ( | XSysMonPsv * | InstancePtr, |
u32 * | IntrStatus | ||
) |
This function returns the interrupt status read from Interrupt Status Register(ISR).
Use the XSYSMONPSV_ISR* constants defined in InstancePtr.h to interpret the returned value.
InstancePtr | is a pointer to the driver instance. |
A | 32-bit value representing the contents of the Interrupt Status Register (ISR). |
References XSYSMONPSV_ISR_OFFSET, and XSysMonPsv_ReadReg32().
u32 XSysMonPsv_IsAlarmPresent | ( | 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::Config, XSysMonPsv_Config::Supply_List, XSYSMONPSV_ALARM_FLAG0, XSYSMONPSV_INVALID, XSYSMONPSV_INVALID_SUPPLY, and XSysMonPsv_ReadReg32().
void XSysMonPsv_Q8P7ToCelsius | ( | u32 | RawData, |
int * | Val, | ||
int * | Val2 | ||
) |
This function converts Q8P7 To Celsius.
RawData | is Raw temperature Data. |
Val | is value in Q8P7 format. |
Val2 | is constant 128. |
References twoscomp.
Referenced by XSysMonPsv_ReadTempProcessed(), and XSysMonPsv_ReadTempProcessedSat().
u32 XSysMonPsv_SupplyOffset | ( | XSysMonPsv * | InstancePtr, |
int | Supply | ||
) |
This function gives the supply offset.
InstancePtr | is a pointer to the XSysMonPsv instance. |
Supply | is an enum which indicates the desired supply. |
References XSysMonPsv::Config, XSysMonPsv_Config::Supply_List, and XSYSMONPSV_SUPPLY.
Referenced by XSysMonPsv_ReadSupplyProcessed(), and XSysMonPsv_ReadSupplyRaw().
void XSysMonPsv_SupplyProcessedToRaw | ( | int | Val, |
int | Val2, | ||
u32 | RegVal, | ||
u32 * | RawData | ||
) |
This function converts processed data to raw.
Val | is numerator for conversion to volts. |
Val2 | is denominator for conversion to volts. |
RegVal | is Register Value. |
RawData | is converted Raw data. |
References XSYSMONPSV_LOW_SAT, XSYSMONPSV_LOW_SAT_SIGNED, XSYSMONPSV_LOW_SAT_SIGNED_VAL, XSYSMONPSV_LOW_SAT_VAL, XSYSMONPSV_SUPPLY_FMT_MASK, XSYSMONPSV_SUPPLY_FMT_SHIFT, XSYSMONPSV_SUPPLY_MODE_MASK, XSYSMONPSV_SUPPLY_MODE_SHIFT, XSYSMONPSV_UP_SAT, XSYSMONPSV_UP_SAT_SIGNED, XSYSMONPSV_UP_SAT_SIGNED_VAL, and XSYSMONPSV_UP_SAT_VAL.
void XSysMonPsv_SupplyRawToProcessed | ( | int | RawData, |
int * | Val, | ||
int * | Val2 | ||
) |
This function converts raw data to processed.
RawData | is raw voltage data. |
Val | is numerator for conversion to volts. |
Val2 | is denominator for conversion to volts. |
References XSYSMONPSV_SUPPLY_FMT_MASK, XSYSMONPSV_SUPPLY_FMT_SHIFT, XSYSMONPSV_SUPPLY_MANTISSA_MASK, XSYSMONPSV_SUPPLY_MANTISSA_SIGN, XSYSMONPSV_SUPPLY_MODE_MASK, and XSYSMONPSV_SUPPLY_MODE_SHIFT.
Referenced by XSysMonPsv_ReadSupplyProcessed().
u32 XSysMonPsv_SupplyThreshOffset | ( | XSysMonPsv * | InstancePtr, |
int | Supply, | ||
XSysMonPsv_EventDir | Dir | ||
) |
This function gives the supply threshold (upper or lower) offset.
InstancePtr | is a pointer to the XSysMonPsv instance. |
Supply | is an enum which indicates the desired supply. |
Dir | is Falling or rising direction. |
References XSysMonPsv::Config, XSysMonPsv_Config::Supply_List, XSYSMONPSV_EV_DIR_RISING, XSYSMONPSV_SUPPLY_TH_LOWER, and XSYSMONPSV_SUPPLY_TH_UPPER.
Referenced by XSysMonPsv_GetSupplyThresholdLower(), XSysMonPsv_GetSupplyThresholdUpper(), XSysMonPsv_SetSupplyThresholdLower(), and XSysMonPsv_SetSupplyThresholdUpper().
int XSysMonPsv_TempOffset | ( | XSysMonPsv_TempType | Type | ) |
This function gives the register offset for the different type.
Type | is Max or Min Temperature Type |
References XSYSMONPSV_DEVICE_TEMP_MAX, XSYSMONPSV_TEMP, XSYSMONPSV_TEMP_MAX, and XSYSMONPSV_TEMP_MIN.
Referenced by XSysMonPsv_ReadTempProcessed(), and XSysMonPsv_ReadTempRaw().
int XSysMonPsv_TempThreshOffset | ( | XSysMonPsv_TempEvt | Event, |
XSysMonPsv_EventDir | Dir, | ||
u32 * | Offset | ||
) |
This function gives the temperature threshold (upper or lower) offset.
Event | is Temp or OT event type. |
Dir | is falling or rising direction |
Offset | is the upper or lower threshold offset. |
References XSYSMONPSV_DEVICE_TEMP_TH_FALLING, XSYSMONPSV_DEVICE_TEMP_TH_RISING, XSYSMONPSV_EV_DIR_RISING, XSYSMONPSV_OT_EVENT, XSYSMONPSV_OT_TEMP_TH_FALLING, XSYSMONPSV_OT_TEMP_TH_RISING, and XSYSMONPSV_TEMP_EVENT.
void XSysMonPsv_UnlockRegspace | ( | XSysMonPsv * | InstancePtr | ) |
This function unlocks the register space of InstancePtr hardware.
InstancePtr | is a pointer to the driver instance. |
References XSYSMONPSV_LOCK_CODE, XSYSMONPSV_PCSR_LOCK, and XSysMonPsv_WriteReg32().