iicps: xiicps_polled_slave_example.c File Reference

| iicps Xilinx SDK Drivers API Documentation

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

Functions
xiicps_polled_slave_example.c File Reference

## Overview

A design example of using the device as slave in polled mode.

This example uses buffer of size 250. Please set the send buffer of the Aardvark device to be continuous data from 0x00 to 0xF9.

     MODIFICATION HISTORY:

    Ver   Who Date     Changes

    1.00a jz  01/30/10 First release

## Functions
int | IicPsSlavePolledExample (u16 DeviceId)
| This function does polled mode transfer in slave mode. More...
int | main (void)
| Main function to call the polled slave example. More...

## Function Documentation

int IicPsSlavePolledExample | ( | u16 | DeviceId | ) |

This function does polled mode transfer in slave mode.

It first sends to master then receives.

Parameters

  DeviceId | is the Device ID of the IicPs Device and is the XPAR_<IICPS_instance>_DEVICE_ID value from xparameters.h

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None.

References XIicPs_Config::BaseAddress, RecvBuffer, SendBuffer, XIicPs_BusIsBusy(), XIicPs_CfgInitialize(), XIicPs_LookupConfig(), XIicPs_SelfTest(), XIicPs_SetSClk(), XIicPs_SetupSlave(), XIicPs_SlaveRecvPolled(), and XIicPs_SlaveSendPolled().

Referenced by main().

int main | ( | void |  | ) |

Main function to call the polled slave example.

Parameters

  None. |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References IicPsSlavePolledExample().