iicps: xiicps_slave_monitor_example.c File Reference

| iicps Xilinx SDK Drivers API Documentation

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

Macros | Functions | Variables
xiicps_slave_monitor_example.c File Reference

## Overview

A design example of using the 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

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

## Functions
int | IicPsSlaveMonitorExample ()
| 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,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 | ( |  | ) |

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

Parameters

  DeviceId | is the Device ID of the IicPs Device and is the XPAR_<IICPS_instance>_DEVICE_ID value from xparameters.h

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.

Parameters

  None. |

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,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.