I2C(1)

NAME
i2c - manual page for i2c 4.19.0

DESCRIPTION
-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>]

  OPTIONS are:

-h - Print this message

-v - Print Version info

-a <addr_width> - Set address width to specified value. May
    be 0, 1, 2 or 4. Default is 1.

-d <data_width> - Set data width to specified value. May
    be 1, 2 or 4. Default is 1.

-x <data_len>   - Present data as two hexa digit string
    (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.

  Possible values for attributes:

    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

SEE ALSO
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.