NotePublic/Software/Applications/I2C/Linux_下_I2C_工具.md

344 B

Linux 下 I2C 工具

# 检测 I2C 设备
i2cdetect -y -r <bus num>
# 设置 I2C 设备寄存器值
i2cset -f -y <bus num> <dev addr> <reg addr> <value>...[c/b/w/i/s]
# 读取 I2C 设备寄存器的值
i2cget -f -y <bus num> <dev addr> [reg addr[b/w/c]]
# Dump I2C 设备寄存器
i2cdump -f -y <bus num> <dev addr> [b/w/W/s/i/c]