Man page - i2c(1)

Packages contas this manual

Manual

I2C(1) User Commands I2C(1)

i2c - manual page for i2c 4.19.0

-E- Invalid switch "-help".

DESCRIPTION:

Generates an i2c operation (read/write/get/set) using an mtusb usb to i2c adapter or using the device internal i2c compatible primary

Usage:

i2c [OPTIONS] <device> <cmd>...
<device>
- Valid MST device.
<cmd>
- Command. May be "r[ead]" or "w[rite]" or "s[et]" or "g[et]".

For read/write commands:

Usage:

i2c [OPTIONS] <device> <cmd> <i2c_addr> <addr> [<data>]

-h - Print this message

-v - Print Version info

be 0, 1, 2 or 4. Default is 1.
be 1, 2 or 4. Default is 1.
(like 01202040ac). Note that this option is mutually exclusive with "-d" option

Parameters are:

<device>
- Valid MST device.
<cmd>
- Command. May be "r[ead]" or "w[rite]".
<i2c_addr>
- I2C secondary address.
<addr>
- Address (addr_width bytes length) inside I2C
target device to read/write operation.
<data>
- Data (data_width bytes length) to write to
target device.

Note that <addr> is ignored if <addr_width> == 0

read/write commands parameters are interpreted as hexa values.

For get/set commands (supported on Linux only):

Usage:

i2c <device> <cmd> <att> [<value>]

Parameters are:

<device>
- Valid MTUSB device.
<cmd>
- Command. May be "g[et]" or "s[et]".
<att>
- Attribute. May be "freq".
<value>
- Set <att> to the specified value.

Frequency: [400, 100]

get/set commands parameters are interpreted as decimal values.

Application return code is zero only when read/write/get/set was successfully completed

The full documentation for i2c is maintained as a Texinfo manual. If the info and i2c programs are properly installed at your site, the command

info i2c

should give you access to the complete manual.

January 2022 i2c 4.19.0