本文主要对i2c-tools工具中的i2cdetect 、i2cdump、i2cget 、 i2cset操作使用进行说明。
一、i2cdetect 命令
1.1 description
Detect i2c devices.
-a All addresses
-F Show functionality
-l List all buses
-r Probe with SMBus Read Byte
-y Answer "yes" to confirmation prompts (for script use)
1.2 usage
语法:
i2cdetect [-y] [-a] [-q|-r] i2cbus [first last]
1.3 Example
查看当前所有i2c总线:
i2cdetect -l
i2c-3 i2c qt-i2c I2C Adapter
i2c-10 i2c qt-i2c I2C Adapter
i2c-1 i2c qt-i2c I2C Adapter
i2c-8 i2c qt-i2c I2C Adapter
i2c-6 i2c qt-i2c I2C Adapter
i2c-4 i2c qt-i2c