Linux command
i2cdump 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Dump
i2cdump [i2cbus] [device_address]
Example
i2cdump -y [i2cbus] [device_address]
Example
i2cdump [i2cbus] [device_address] [b|w|c|s|i]
Example
i2cdump -r [start]-[end] [i2cbus] [device_address]
说明
i2cdump reads and displays all registers of an I2C device connected to a specified bus. It outputs a hexadecimal table showing register addresses and their contents, useful for debugging I2C hardware. All addresses should be specified in hexadecimal notation. The i2cbus number can be determined using i2cdetect -l, and device addresses can be found with i2cdetect.
参数
- -y
- Disable interactive confirmation (dangerous on some hardware)
- -r _START-END_
- Limit dump to registers in specified range
- b
- Byte mode (default for most devices)
- w
- Word mode (16-bit values)
- c
- Consecutive byte mode
- s
- SMBus block mode
- i
- I2C block mode
FAQ
What is the i2cdump command used for?
i2cdump reads and displays all registers of an I2C device connected to a specified bus. It outputs a hexadecimal table showing register addresses and their contents, useful for debugging I2C hardware. All addresses should be specified in hexadecimal notation. The i2cbus number can be determined using i2cdetect -l, and device addresses can be found with i2cdetect.
How do I run a basic i2cdump example?
Run `i2cdump [i2cbus] [device_address]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -y do in i2cdump?
Disable interactive confirmation (dangerous on some hardware)