Documentation/tutorial for i2c library?

I’d like to write code to get this Adafruit i2c LCD display and keypad to work with the Jetson Xavier:

Where can I go to get familiar with the Linux i2c library used for the Xavier (the one used by Jetsonhacks on their code for the Adafruit 7-segment LCD and servo driver)? Thank you.

Have a check below lib

Thank you, but I was looking for something to explain the usage of the linux/i2c-dev.h i2c library, not just stick another library on top of it.

Also, are there any good resources for learning about i2c programming in general?

The file itself is pretty well documented. https://www.kernel.org/doc/Documentation/i2c/dev-interface

If that’s not what you’re looking for this tutorial should do the trick. I2C - learn.sparkfun.com

Hi ,

there are two I2C host on Xavier’s external 40 pin header. I try to find Xaiver’s I2C library.

  1. NVIDIA Xavier - I2C
  2. GitHub - amaork/libi2c: Linux i2c library, support C/C++/Python

question

  1. from the first link view , need to know external 40 pin’s I2C host address

  2. the 2nd link look like host access device , the code look like one host, need to know how to assign I2C host ?

  3. Can you provide external 40 pin’s I2C’s library for Python ?

The pin and function should be like below. You need to figure out the Python by yourself.
Bus I2C Label Device Tree
i2c0 3160000 I2C1_CLK/I2C1_DAT
i2c1 c240000 I2C2_CLK/I2C2_DAT
i2c2 3180000 I2C3_CLK/I2C3_DAT
i2c3 3190000 DP_AUX_CH1_*
i2c4 31a0000 N/A
i2c5 31b0000 DP_AUX_CH0_*
i2c6 31c0000 DP_AUX_CH2_*
i2c7 c250000 2C4_CLK/I2C4_DAT
i2c8 31e0000 2C5_CLK/I2C5_DAT