i3cpsx
Vitis Drivers API Documentation
xi3cpsx_polled_example.c File Reference

Overview

Design example to use the I3C device as master in polled mode.

It perform read operation with repeated start by first sending register address without TOC and receives data from slave. This example runs on versal net evaluation board.

LSM6DSO sensor interfaced on I3CPS0 of versal net evaluation board. Refer data sheet of LSM6DSO sensor for slave device registers details.

 MODIFICATION HISTORY:
Ver   Who Date     Changes


1.00 sd 06/21/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 and remove resetfifos

Functions

int I3cPsxMasterPolledExample (u16 DeviceId)
 This function does a minimal 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 I3cPsxMasterPolledExample ( u16  DeviceId)

This function does a minimal 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

This function uses polled driver mode of the I3C.

Parameters
DeviceIdis 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_MasterRecvPolled(), XI3cPsx_MasterSendPolled(), and XI3cPsx_ResetFifos().

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 I3cPsxMasterPolledExample().