iicps
Xilinx SDK Drivers API Documentation
xiicps_polled_master_example.c File Reference

Overview

A design example of using the device in polled mode as master.

The example uses buffer size 132. Please set the send buffer of the Aardvark device to be continuous 64 bytes from 0x00 to 0x3F.

 MODIFICATION HISTORY:
 Ver   Who Date     Changes

1.00a jz 01/30/10 First release
 

Functions

int IicPsMasterPolledExample (u16 DeviceId)
 This function sends data and expects to receive data from slave as modular of 64. More...
 
int main (void)
 Main function to call the polled master example. More...
 

Variables

XIicPs Iic
 Instance of the IIC Device. More...
 
u8 SendBuffer [TEST_BUFFER_SIZE]
 Buffer for Transmitting Data. More...
 
u8 RecvBuffer [TEST_BUFFER_SIZE]
 Buffer for Receiving Data. More...
 

Function Documentation

◆ IicPsMasterPolledExample()

int IicPsMasterPolledExample ( u16  DeviceId)

This function sends data and expects to receive data from slave as modular of 64.

This function uses interrupt-driven mode of the device.

Parameters
DeviceIdis 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 XIicPs_Config::BaseAddress, XIicPs_CfgInitialize(), XIicPs_LookupConfig(), XIicPs_SelfTest(), and XIicPs_SetSClk().

Referenced by main().

◆ main()

int main ( void  )

Main function to call the polled master example.

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

References IicPsMasterPolledExample().

Variable Documentation

◆ Iic

XIicPs Iic

Instance of the IIC Device.

◆ RecvBuffer

u8 RecvBuffer[TEST_BUFFER_SIZE]

Buffer for Receiving Data.

◆ SendBuffer

u8 SendBuffer[TEST_BUFFER_SIZE]

Buffer for Transmitting Data.