i2c tool是一套在Linux用户态帮助调试i2c总线外设的工具。
官方网站:https://i2c.wiki.kernel.org/index.php/I2C_Tools。
https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/

参数说明:
-y:自动选择yes-r:快速读指令-q:快速写指令-f:强制使用此设备地址(1)探测i2c总线:
i2cdetect -l

(2)探测i2c设备
i2cdetect -y -r <id>
i2c0总线上地址0x1e处有设备:

i2c1总线上0x1a和0x38处有设备:

(3)查看设备支持的功能
i2cdetect -F 1


i2cdump -f -y <id> <device addr>


