![]() |
spi
Vitis Drivers API Documentation
|
This file contains a example for using the SPI Hardware and driver.
None
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a sv 05/16/05 Initial release for TestApp integration. 1.11a sdm 03/03/08 Minor changes to comply to coding guidelines 3.00a ktn 10/28/09 Converted all register accesses to 32 bit access. Updated to use the HAL APIs/macros. Replaced call to XSpi_Initialize API with XSpi_LookupConfig and XSpi_CfgInitialize. 4.2 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. 4.11 sb 07/11/23 Added support for system device-tree flow.
Functions | |
int | SpiSelfTestExample (u16 DeviceId) |
This function does a selftest and loopback test on the SPI device and XSpi driver as an example. More... | |
int | main (void) |
Main function to call the example. More... | |
int main | ( | void | ) |
Main function to call the example.
This function is not included if the example is generated from the TestAppGen test tool.
References SpiSelfTestExample().
int SpiSelfTestExample | ( | u16 | DeviceId | ) |
This function does a selftest and loopback test on the SPI device and XSpi driver as an example.
The purpose of this function is to illustrate how to use the XSpi component.
DeviceId | is the XPAR_<SPI_instance>_DEVICE_ID value from xparameters.h |
References XSpi_Config::BaseAddress, XSpi_CfgInitialize(), XSpi_LookupConfig(), and XSpi_SelfTest().
Referenced by main().