i2c_if.h

Overview

Related Modules:

I2C

Description:

Declares the standard I2C interface functions.

Since:

1.0

Summary

Data Structures

Data Structure Name

Description

I2cMsg

Defines the I2C transfer message used during custom transfers.

Enumerations

Enumeration Name

Description

I2cFlag {   I2C_FLAG_READ = (0x1 << 0), I2C_FLAG_ADDR_10BIT = (0x1 << 4), I2C_FLAG_READ_NO_ACK = (0x1 << 11), I2C_FLAG_IGNORE_NO_ACK = (0x1 << 12),   I2C_FLAG_NO_START = (0x1 << 14), I2C_FLAG_STOP = (0x1 << 15) }

Enumerates flags used for transferring I2C messages.

Functions

Function Name

Description

I2cOpen (int16_t number)

struct DevHandle  

Obtains the handle of an I2C controller.

I2cClose (struct DevHandle handle)

void 

Releases the handle of an I2C controller.

I2cTransfer (struct DevHandle handle, struct I2cMsg msgs, int16_t count)

int32_t 

Launches a custom transfer to an I2C device.