| i3cpsx Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
xi3cpsx_slave_loopback.c File Reference

## Overview

This file consists of a slave mode design example which uses the Xilinx I3C device in slave mode in a loopback setup.

The master recives the data and also sends the data to the slave.

This code assumes that no Operating System is being used.

Note

It's a reference example and the data size should be less than or equal to FIFO size.

    MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    1.00a sd  06/10/22 First release
    1.3   sd   11/17/23 Added support for system device-tree flow
    1.4   gm   10/06/24 Added return statements, remove resetfifos and remove
                        hard coded values.

## Functions
int | I3cPsxSlaveLoopbackExample (u16 DeviceId)
| This function does a slave loopback test on the I3c device and driver as a design example. More...
int | main (void)
| Main function to call the polled example. More...

## Function Documentation

int I3cPsxSlaveLoopbackExample | ( | u16 | DeviceId | ) |

This function does a slave loopback test on the I3c device and driver as a design example.

The purpose of this function is to illustrate how to use the XI3cPsx driver.

This function sends data and expects to receive the same data through the I3C slave loopback. It expects the controllers to be in loopback.

This function uses slave driver mode of the I3C.

Parameters

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

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note

References XI3cPsx_Config::BaseAddress, XI3cPsx_CfgInitialize(), XI3cPsx_MasterSendPolled(), XI3cPsx_ResetFifos(), XI3cPsx_SetupSlave(), and XI3cPsx_SlaveRecvPolled().

Referenced by main().

int main | ( | void |  | ) |

Main function to call the polled example.

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References I3cPsxSlaveLoopbackExample().