spips: xspips_selftest_example.c File Reference

| spips Xilinx SDK Drivers API Documentation

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

Functions
xspips_selftest_example.c File Reference

## Overview

This file contains an example for using the SPI Hardware, it does a simple hardware connection check.

Note

None

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.00  drg/jz 01/25/10 First release.

## Functions
int | SpiPsSelfTestExample (u16 DeviceId)
| This function does a selftest on the SPI device and XSpiPs driver as an example. More...
int | main (void)
| Main function to call the Spi SelfTest example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the Spi SelfTest example.

Parameters

  None |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None

References SpiPsSelfTestExample().

int SpiPsSelfTestExample | ( | u16 | DeviceId | ) |

This function does a selftest on the SPI device and XSpiPs driver as an example.

The purpose of this function is to illustrate the usage of the XSpiPs driver.

Parameters

  DeviceId | is the XPAR_<SPIPS_instance>_DEVICE_ID value from xparameters.h

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None

References XSpiPs_Config::BaseAddress, XSpiPs_CfgInitialize(), XSpiPs_LookupConfig(), and XSpiPs_SelfTest().

Referenced by main().