libpynq (release 5EWC0-2023 version 0.2.1 of 2023-09-01 11:02)
Loading...
Searching...
No Matches
i2cps.h File Reference
#include <linux/i2c-dev.h>
Include dependency graph for i2cps.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define writeI2C_byte(i2c_fd, u8RegAddr, u8Data)    i2c_smbus_write_byte_data(i2c_fd, u8RegAddr, u8Data);
 
#define writeI2C_word(i2c_fd, u8RegAddr, u16Data)    i2c_smbus_write_word_data(i2c_fd, u8RegAddr, u16Data);
 

Functions

int setI2C (unsigned int index, long slave_addr)
 
int unsetI2C (int i2c_fd)
 
int writeI2C_asFile (int i2c_fd, unsigned char writebuffer[], unsigned char bytes)
 
int readI2C_asFile (int i2c_fd, unsigned char readbuffer[], unsigned char bytes)
 

Detailed Description

Functions to interact with linux I2C.

MODIFICATION HISTORY:

Ver   Who      Date     Changes
----- -------- -------- -----------------------------------------------
1.00a gn       01/24/15 First release
1.00b yrq      08/31/16 Added license header

Definition in file i2cps.h.

Macro Definition Documentation

◆ writeI2C_byte

#define writeI2C_byte (   i2c_fd,
  u8RegAddr,
  u8Data 
)     i2c_smbus_write_byte_data(i2c_fd, u8RegAddr, u8Data);

Definition at line 63 of file i2cps.h.

◆ writeI2C_word

#define writeI2C_word (   i2c_fd,
  u8RegAddr,
  u16Data 
)     i2c_smbus_write_word_data(i2c_fd, u8RegAddr, u16Data);

Definition at line 66 of file i2cps.h.

Function Documentation

◆ readI2C_asFile()

int readI2C_asFile ( int  i2c_fd,
unsigned char  readbuffer[],
unsigned char  bytes 
)

Definition at line 6 of file i2cps.c.

Here is the caller graph for this function:

◆ setI2C()

int setI2C ( unsigned int  index,
long  slave_addr 
)

Definition at line 2 of file i2cps.c.

Here is the caller graph for this function:

◆ unsetI2C()

int unsetI2C ( int  i2c_fd)

Definition at line 3 of file i2cps.c.

Here is the caller graph for this function:

◆ writeI2C_asFile()

int writeI2C_asFile ( int  i2c_fd,
unsigned char  writebuffer[],
unsigned char  bytes 
)

Definition at line 4 of file i2cps.c.

Here is the caller graph for this function: