spi
Vitis Drivers API Documentation
XSpi Struct Reference

The XSpi driver instance data. More...

Data Fields

XSpi_Stats Stats
 Statistics. More...
 
UINTPTR BaseAddr
 Base address of device (IPIF) More...
 
int IsReady
 Device is initialized and ready. More...
 
int IsStarted
 Device has been started. More...
 
int HasFifos
 Device is configured with FIFOs or not. More...
 
u32 SlaveOnly
 Device is configured to be slave only. More...
 
u8 NumSlaveBits
 Number of slave selects for this device. More...
 
u8 DataWidth
 Data Transfer Width 8 or 16 or 32. More...
 
u8 SpiMode
 Standard/Dual/Quad mode. More...
 
u32 SlaveSelectMask
 Mask that matches the number of SS bits. More...
 
u32 SlaveSelectReg
 Slave select register. More...
 
u8 * SendBufferPtr
 Buffer to send. More...
 
u8 * RecvBufferPtr
 Buffer to receive. More...
 
unsigned int RequestedBytes
 Total bytes to transfer (state) More...
 
unsigned int RemainingBytes
 Bytes left to transfer (state) More...
 
int IsBusy
 A transfer is in progress (state) More...
 
XSpi_StatusHandler StatusHandler
 Status Handler. More...
 
void * StatusRef
 Callback reference for status handler. More...
 
u32 FlashBaseAddr
 Used in XIP Mode. More...
 
u8 XipMode
 0 if Non-XIP, 1 if XIP Mode More...
 
u16 FifosDepth
 TX and RX FIFO Depth. More...
 

Detailed Description

The XSpi driver instance data.

The user is required to allocate a variable of this type for every SPI device in the system. A pointer to a variable of this type is then passed to the driver API functions.

Field Documentation

UINTPTR XSpi::BaseAddr

Base address of device (IPIF)

Referenced by XSpi_CfgInitialize(), XSpi_InterruptHandler(), XSpi_Reset(), XSpi_SelfTest(), and XSpi_Transfer().

u8 XSpi::DataWidth

Data Transfer Width 8 or 16 or 32.

Referenced by XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

u16 XSpi::FifosDepth

TX and RX FIFO Depth.

Referenced by XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

u32 XSpi::FlashBaseAddr

Used in XIP Mode.

Referenced by SpiXipExample(), and XSpi_CfgInitialize().

int XSpi::HasFifos

Device is configured with FIFOs or not.

Referenced by XSpi_Abort(), XSpi_CfgInitialize(), and XSpi_SelfTest().

int XSpi::IsBusy
int XSpi::IsStarted

Device has been started.

Referenced by XSpi_CfgInitialize(), XSpi_Reset(), XSpi_Start(), XSpi_Stop(), and XSpi_Transfer().

u8 XSpi::NumSlaveBits

Number of slave selects for this device.

Referenced by XSpi_CfgInitialize(), and XSpi_SetSlaveSelect().

u8* XSpi::RecvBufferPtr

Buffer to receive.

Referenced by XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

unsigned int XSpi::RemainingBytes

Bytes left to transfer (state)

Referenced by XSpi_Abort(), XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

unsigned int XSpi::RequestedBytes

Total bytes to transfer (state)

Referenced by XSpi_Abort(), XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

u8* XSpi::SendBufferPtr

Buffer to send.

Referenced by XSpi_CfgInitialize(), XSpi_InterruptHandler(), and XSpi_Transfer().

u32 XSpi::SlaveOnly

Device is configured to be slave only.

Referenced by XSpi_CfgInitialize(), and XSpi_SetOptions().

u32 XSpi::SlaveSelectMask

Mask that matches the number of SS bits.

Referenced by XSpi_Abort(), XSpi_CfgInitialize(), XSpi_InterruptHandler(), XSpi_Reset(), XSpi_SelfTest(), and XSpi_Transfer().

u32 XSpi::SlaveSelectReg
u8 XSpi::SpiMode

Standard/Dual/Quad mode.

Referenced by SpiIntrExample(), SpiPolledExample(), XSpi_CfgInitialize(), and XSpi_SelfTest().

XSpi_StatusHandler XSpi::StatusHandler
void* XSpi::StatusRef

Callback reference for status handler.

Referenced by XSpi_InterruptHandler(), and XSpi_SetStatusHandler().

u8 XSpi::XipMode

0 if Non-XIP, 1 if XIP Mode

Referenced by XSpi_CfgInitialize(), and XSpi_SelfTest().