Applibs i2c.h

Header: #include <applibs/i2c.h>

The Applibs I2C header contains functions and types that interact with an I2C (Inter-Integrated Circuit) interface.

Application manifest requirements

To access an I2C master interface, your application must identify it in the I2cMaster field of the application manifest.

Hardware dependent IDs

I2C functions reference some identifiers that are hardware dependent. Hardware dependent IDs are constants that are defined in the hardware definition files for a device. For more information, see Manage target hardware dependencies.

Concepts and samples

Functions

Function Description
I2CMaster_Open Opens and configures an I2C master interface for exclusive use by an application, and returns a file descriptor used to perform operations on the interface.
I2CMaster_Read Performs a read operation on an I2C master interface.
I2CMaster_SetBusSpeed Sets the I2C bus speed for operations on the I2C master interface.
I2CMaster_SetDefaultTargetAddress Sets the address of the subordinate device that is targeted by calls to read(2) and write(2) POSIX functions on the I2C master interface.
I2CMaster_SetTimeout Sets the timeout for operations on an I2C master interface.
I2CMaster_Write Performs a write operation on an I2C master interface.
I2CMaster_WriteThenRead Performs a combined write-then-read operation on an I2C master interface.

Typedefs

Typedef Description
I2C_DeviceAddress A 7-bit or 10-bit I2C device address, which specifies the target of an I2C operation.
I2C_InterfaceId The ID of an I2C master interface instance.