wifiiot_i2c.h

Overview

Related Modules:

Wifiiot

Description:

Declares the I2C interface functions.

These functions are used for I2C initialization and data transmission.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

WifiIotI2cData

Defines I2C data transmission attributes.

Enumerations

Enumeration Name

Description

WifiIotI2cIdx { WIFI_IOT_I2C_IDX_0, WIFI_IOT_I2C_IDX_1 }

Enumerates I2C hardware indexes.

Functions

Function Name

Description

I2cInit (WifiIotI2cIdx id, unsigned int baudrate)

unsigned int 

Initializes an I2C device with a specified baud rate.

I2cDeinit (WifiIotI2cIdx id)

unsigned int 

Deinitializes an I2C device.

I2cWrite (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData i2cData)

unsigned int 

Writes data to an I2C device.

I2cRead (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData i2cData)

unsigned int 

Reads data from an I2C device.