| iicps Vitis Drivers API Documentation

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

Functions
xiicps_smbus_polled_slave_example.c File Reference

## Overview

This example can run on zynqmp / versal platform evaluation board and IIC controller configured slave in polled mode and loopback setup used for master.

It sends and receives the data using IIC device as slave for SMBus transfers.

     MODIFICATION HISTORY:

    Ver   Who Date     Changes

    1.00  gm  05/10/22 First release
    3.18  gm  07/14/23 Added SDT support.

## Functions
int | IicPsSmbusSlavePolledExample (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 IicPsSmbusSlavePolledExample | ( | 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, XIicPs_CfgInitialize(), XIicPs_LookupConfig(), XIicPs_SelfTest(), XIicPs_SetSClk(), and XIicPs_SetupSlave().

Referenced by main().

int main | ( | void |  | ) |

Main function to call the polled slave example.

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References IicPsSmbusSlavePolledExample().