| iicps Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Macros | Functions | Variables
xiicps_slave_monitor_example.c File Reference

## Overview

This example runs on zynqmp / versal / vek385 evaluation boards using the IIC device as master to check slave's availability.

Note
  Please set the slave address to 0x3FB, which tests the device's ability to handle 10-bit address.

     MODIFICATION HISTORY:

    Ver   Who Date     Changes

    1.00a jz  01/30/10 First release
    3.18  gm  07/14/23 Added SDT support.
    3.21  an  03/28/25 Added VEK385 board i2c slave address

## Macros
#define | SLV_MON_LOOP_COUNT 0x000FFFFF
| Slave Monitor Loop Count. More...

## Functions
int | IicPsSlaveMonitorExample (void)
| This function checks the availability of a slave using slave monitor mode. More...
int | main (void)
| Main function to call the Slave Monitor example. More...

## Variables
volatile u8 | TransmitComplete
| Flag to check completion of Transmission. More...
volatile u8 | ReceiveComplete
| Flag to check completion of Reception. More...
volatile u32 | TotalErrorCount
| Total Error Count Flag. More...
volatile u32 | SlaveResponse
| Slave Response Flag. More...
u16 | SlvAddr [] = {0x54, 0x55, 0x74, 0x72, 0}
| Searching for the required Slave Address and user can also add their own slave Address in the below array list. More...

## Macro Definition Documentation

#define SLV_MON_LOOP_COUNT 0x000FFFFF

Slave Monitor Loop Count.

## Function Documentation

int IicPsSlaveMonitorExample | ( | void |  | ) |

This function checks the availability of a slave using slave monitor mode.

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None.

References SlvAddr.

Referenced by main().

int main | ( | void |  | ) |

Main function to call the Slave Monitor example.

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References IicPsSlaveMonitorExample().

## Variable Documentation

volatile u8 ReceiveComplete

Flag to check completion of Reception.

volatile u32 SlaveResponse

Slave Response Flag.

u16 SlvAddr[] = {0x54, 0x55, 0x74, 0x72, 0}

Searching for the required Slave Address and user can also add their own slave Address in the below array list.

Referenced by IicPsSlaveMonitorExample().

volatile u32 TotalErrorCount

Total Error Count Flag.

volatile u8 TransmitComplete

Flag to check completion of Transmission.