iic
Xilinx Vitis Drivers API Documentation
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.

Functions

int IicSelfTestExample (u16 DeviceId)
 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 ( u16  DeviceId)

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

Parameters
DeviceIdis the XPAR_<IIC_instance>_DEVICE_ID value from xparameters.h.
Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful.
Note
None.

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