iic
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
xiic_selftest_example.c File Reference

Overview

This file contains a example for using the IIC hardware device and XIic driver.

Note

None

MODIFICATION HISTORY:
Ver   Who  Date  Changes


1.00a sv 05/09/05 Initial release for TestApp integration. 2.00a sdm 09/22/09 Updated to use the HAL APIs, replaced call to XIic_Initialize API with XIic_LookupConfig and XIic_CfgInitialize. Minor changes made as per coding guidelines. 3.4 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. 3.10 gm 07/09/23 Added SDT support. 3.15 vlt 12/12/25 Update Doxygen comments to include SDT flow details.

#include "xparameters.h"
#include "xiic.h"
#include "xil_printf.h"

Functions

int IicSelfTestExample (UINTPTR BaseAddress)
 This function does a selftest on the IIC device and XIic driver as an example. More...
 
int main (void)
 Main function to call the example. More...
 

Function Documentation

int IicSelfTestExample ( UINTPTR  BaseAddress)

This function does a selftest on the IIC device and XIic driver as an example.

Parameters
BaseAddresscontains the base address of the device
Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful.
Note
In XSCT/classic flow, DeviceId is used to look up the device configuration.

References XIic_Config::BaseAddress, XIic_CfgInitialize(), XIic_LookupConfig(), and XIic_SelfTest().

Referenced by main().

int main ( void  )

Main function to call the example.

This function is not included if the example is generated from the TestAppGen test tool.

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

References IicSelfTestExample(), and XIIC_BASEADDRESS.