spi: XSpi Struct Reference

| spi Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

- Data Structures
- Data Fields

Data Fields
XSpi Struct Reference
Spi_v4_5

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...

## 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().

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

A transfer is in progress (state)

Referenced by XSpi_Abort(), XSpi_CfgInitialize(), XSpi_InterruptHandler(), XSpi_SetOptions(), XSpi_SetSlaveSelect(), XSpi_Stop(), and XSpi_Transfer().

int XSpi::IsReady

Device is initialized and ready.

Referenced by XSpi_CfgInitialize(), XSpi_ClearStats(), XSpi_GetOptions(), XSpi_GetSlaveSelect(), XSpi_GetStats(), XSpi_Reset(), XSpi_SelfTest(), XSpi_SetOptions(), XSpi_SetSlaveSelect(), XSpi_SetStatusHandler(), XSpi_Start(), XSpi_Stop(), and XSpi_Transfer().

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

Slave select register.

Referenced by XSpi_CfgInitialize(), XSpi_GetSlaveSelect(), XSpi_Reset(), XSpi_SetSlaveSelect(), and XSpi_Transfer().

u8 XSpi::SpiMode

Standard/Dual/Quad mode.

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

XSpi_Stats XSpi::Stats

Statistics.

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

XSpi_StatusHandler XSpi::StatusHandler

Status Handler.

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

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().