![]() |
prd
Vitis Drivers API Documentation
|
Data Structures | |
struct | XPrd |
The XPrd instance data structure. More... | |
Macros | |
#define | XPrd_ReadReg(Address) Xil_In32(Address) |
This macro reads a value from the given register. More... | |
#define | XPrd_WriteReg(Address, Data) Xil_Out32(Address, (u32)(Data)) |
This macro writes a value to the given register. More... | |
Enumerations | |
enum | XPrd_State { XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON } |
Functions | |
s32 | XPrd_CfgInitialize (XPrd *InstancePtr, XPrd_Config *ConfigPtr, u32 EffectiveAddress) |
This function initializes a XPrd instance/driver. More... | |
void | XPrd_SetDecouplerState (XPrd *InstancePtr, XPrd_State DecouplerValue) |
This function is used to set Decoupler On or Off. More... | |
XPrd_State | XPrd_GetDecouplerState (XPrd *InstancePtr) |
This function is used to read the state of the Decoupler. More... | |
XPrd_Config * | XPrd_LookupConfig (u16 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
s32 | XPrd_SelfTest (XPrd *InstancePtr) |
This function runs a self-test for the PRD driver. More... | |
Register Offset | |
#define | XPRD_CTRL_OFFSET (0x000) |
Control register Offset and status register is also mappped to same address as Control register. More... | |
Register Mask | |
#define | XPRD_CTRL_DECOUPLER_MASK (0x00000001) |
Decoupler Mask. More... | |
#define XPRD_CTRL_DECOUPLER_MASK (0x00000001) |
Decoupler Mask.
Referenced by XPrd_GetDecouplerState().
#define XPRD_CTRL_OFFSET (0x000) |
Control register Offset and status register is also mappped to same address as Control register.
Referenced by XPrd_GetDecouplerState(), XPrd_SelfTest(), and XPrd_SetDecouplerState().
#define XPrd_ReadReg | ( | Address | ) | Xil_In32(Address) |
This macro reads a value from the given register.
Address | is the address of the register to read from. |
Referenced by XPrd_GetDecouplerState(), and XPrd_SelfTest().
#define XPrd_WriteReg | ( | Address, | |
Data | |||
) | Xil_Out32(Address, (u32)(Data)) |
This macro writes a value to the given register.
Address | is the address of the register to write to. |
Data | is the 32-bit value to write to the register. |
Referenced by XPrd_SetDecouplerState().
enum XPrd_State |
s32 XPrd_CfgInitialize | ( | XPrd * | InstancePtr, |
XPrd_Config * | ConfigPtr, | ||
u32 | EffectiveAddress | ||
) |
This function initializes a XPrd instance/driver.
InstancePtr | is a pointer to the XPrd instance. |
ConfigPtr | points to the XPrd device configuration structure. |
EffectiveAddress | is the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed. |
Set some default values for instance data, don't indicate the device is ready to use until everything has been initialized successfully.
References XPrd::Config, and XPrd::IsReady.
Referenced by XPrd_Example(), and XPrd_SelfTestExample().
XPrd_State XPrd_GetDecouplerState | ( | XPrd * | InstancePtr | ) |
This function is used to read the state of the Decoupler.
InstancePtr | is a pointer to the XPrd instance. |
References XPrd::Config, XPrd::IsReady, XPRD_CTRL_DECOUPLER_MASK, XPRD_CTRL_OFFSET, XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON, and XPrd_ReadReg.
Referenced by XPrd_TestDecouplerState().
XPrd_Config * XPrd_LookupConfig | ( | u16 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XPrd_ConfigTable[] contains the configuration information for each device in the system.
DeviceId | is the unique device ID of the device being looked up. |
Referenced by XPrd_Example(), and XPrd_SelfTestExample().
s32 XPrd_SelfTest | ( | XPrd * | InstancePtr | ) |
This function runs a self-test for the PRD driver.
This self test reads the value from the status register.
InstancePtr | is a pointer to the XPrd instance. |
References XPrd::Config, XPrd::IsReady, XPRD_CTRL_OFFSET, and XPrd_ReadReg.
Referenced by XPrd_Example(), and XPrd_SelfTestExample().
void XPrd_SetDecouplerState | ( | XPrd * | InstancePtr, |
XPrd_State | DecouplerValue | ||
) |
This function is used to set Decoupler On or Off.
InstancePtr | is a pointer to the XPrd instance. |
DecouplerValue | is to set Decoupler On or Off. Value can be either 0 or 1. Values are
|
References XPrd::Config, XPrd::IsReady, XPRD_CTRL_OFFSET, XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON, and XPrd_WriteReg.
Referenced by XPrd_TestDecouplerState().