XIsf_SetSpiConfiguration - 2020.2 English

OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2020-11-24
Version
2020.2 English

This API sets the configuration of SPI.

This will set the options and clock prescaler (if applicable).

Note: This API can be called before calling XIsf_Initialize() to initialize the SPI interface in other than default options mode. PreScaler is only applicable to PS SPI/QSPI.

Prototype

int XIsf_SetSpiConfiguration(XIsf *InstancePtr, XIsf_Iface *SpiInstPtr, u32 Options, u8 PreScaler);

Parameters

The following table lists the XIsf_SetSpiConfiguration function arguments.

Table 1. XIsf_SetSpiConfiguration Arguments
Type Name Description
XIsf * InstancePtr Pointer to the XIsf instance.
XIsf_Iface * SpiInstPtr Pointer to XIsf_Iface instance to be worked on.
u32 Options Specified options to be set.
u8 PreScaler Value of the clock prescaler to set.

Returns

XST_SUCCESS if successful else XST_FAILURE.