iic
Xilinx Vitis Drivers API Documentation
xiic_low_level_tempsensor_example.c File Reference

Overview

This file contains a polled mode design example which uses the Xilinx IIC device and low-level driver to execise the temperature sensor on the ML300 board.

This example only performs read operations (receive) from the IIC temperature sensor of the platform.

The XIic_Recv() API is used to receive the data.

Note

7-bit addressing is used to access the tempsensor.

None

MODIFICATION HISTORY:
Ver   Who  Date  Changes


1.00a jhl 10/09/03 Initial Release 1.00a sv 05/09/05 Minor changes to comply to Doxygen and coding guidelines 1.00a mta 03/09/06 Minor updates due to changes in the low level driver for supporting repeated start functionality. 2.00a sdm 09/22/09 Minor modifications as per coding guidelines.

 

Functions

int LowLevelTempSensorExample (u32 IicBaseAddress, u8 TempSensorAddress, u8 *TemperaturePtr)
 The function reads the temperature of the IIC temperature sensor on the IIC bus using the low-level driver. More...
 
int main (void)
 The purpose of this function is to illustrate how to use the IIC level 0 driver to read the temperature. More...
 

Function Documentation

int LowLevelTempSensorExample ( u32  IicBaseAddress,
u8  TempSensorAddress,
u8 *  TemperaturePtr 
)

The function reads the temperature of the IIC temperature sensor on the IIC bus using the low-level driver.

Parameters
IicBaseAddressis the base address of the device.
TempSensorAddressis the address of the Temperature Sensor device on the IIC bus.
TemperaturePtris the databyte read from the temperature sensor.
Returns
The number of bytes read from the temperature sensor, normally one byte if successful.
Note
None.

References XIic_Recv(), and XIIC_STOP.

Referenced by main().

int main ( void  )

The purpose of this function is to illustrate how to use the IIC level 0 driver to read the temperature.

Returns
Always 0
Note

The main function is returning an integer to prevent compiler warnings.

References LowLevelTempSensorExample().