今後はPythonでI2C制御することを考えており、その際に存在が隠れてしまうi2c-toolsについて何かあったときのために情報を手繰れるようにしておきます。
シェルコマンドからi2c-toolsのコマンドを叩いたときのI2C信号の動きを解説したサイトは以下です。
Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x03 – 0x77)
MODE is one of:
b (read byte data, default)
w (read word data)
c (write byte/read byte)
Append p for SMBus PEC
ex.) i2cget -y 1 0x08 0x00 c(-y optionで入力待ちをしないようにしています)
Usage: i2cset [-f] [-y] [-m MASK] [-r] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] … [MODE]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x03 – 0x77)
MODE is one of:
c (byte, no value)
b (byte data, default)
w (word data)
i (I2C block data)
s (SMBus block data)
Append p for SMBus PEC
Usage: i2cdump [-f] [-y] [-r first-last] I2CBUS ADDRESS [MODE [BANK [BANKREG]]]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x03 – 0x77)
MODE is one of:
b (byte, default)
w (word)
W (word on even register addresses)
s (SMBus block)
i (I2C block)
c (consecutive byte)
Append p for SMBus PEC
ex.) i2cdump -y 1 0x08
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -F I2CBUS
i2cdetect -l
I2CBUS is an integer or an I2C bus name
If provided, FIRST and LAST limit the probing range.
ex.) i2cdetect -y 1
それぞれの動きがタイミングチャートで示されています。