SWILIB API (SG)    
Loading...
Searching...
No Matches
I2C

Detailed Description

Functions for working with I2C bus.

Usage: #include <swilib.h> or #include <swilib/i2c.h>

Data Structures

struct  I2C_MSG
 I2C SMBUS message. More...
 

Typedefs

typedef struct I2C_MSG I2C_MSG
 

Functions

int i2c_transfer (I2C_MSG *msg)
 Read data from the I2C device (SMBUS).
 
int i2c_receive (I2C_MSG *msg)
 Write data to the I2C device (SMBUS).
 

Data Structure Documentation

◆ I2C_MSG

struct I2C_MSG

Typedef Documentation

◆ I2C_MSG

typedef struct I2C_MSG I2C_MSG

Definition at line 17 of file i2c.h.

Function Documentation

◆ i2c_transfer()

int i2c_transfer ( I2C_MSG * msg)

Read data from the I2C device (SMBUS).

Parameters
msgi2c message I2C_MSG
Returns
0 or error

◆ i2c_receive()

int i2c_receive ( I2C_MSG * msg)

Write data to the I2C device (SMBUS).

Parameters
msgi2c message I2C_MSG
Returns
0 or error