i3cpsx
Vitis Drivers API Documentation
xi3cpsx_intr_example.c File Reference

Overview

Design example to use the I3C device as master in interrupt-driven 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 I3cPsxMasterIntrExample (u16 DeviceId)
 This function does a minimal test on the I3c device and driver as a design example. More...
 
void Handler (void *CallBackRef, u32 Event)
 This function is the handler which updates transfer status up on events from the I3cPsx. More...
 
int main (void)
 Main function to call the interrupt example. More...
 

Function Documentation

void Handler ( void *  CallBackRef,
u32  Event 
)

This function is the handler which updates transfer status up on events from the I3cPsx.

It is called from an interrupt context such that the amount of processing performed should be minimized.

Returns
None.
Note
None.

Referenced by I3cPsxMasterIntrExample().

int I3cPsxMasterIntrExample ( 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 interrupt 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, Handler(), XI3cPsx_CfgInitialize(), XI3cPsx_MasterInterruptHandler(), XI3cPsx_MasterRecv(), XI3cPsx_MasterSend(), XI3cPsx_ResetFifos(), and XI3cPsx_SetStatusHandler().

Referenced by main().

int main ( void  )

Main function to call the interrupt example.

Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful.
Note
None.

References I3cPsxMasterIntrExample().