File: i2cset.8

package info (click to toggle)
lm-sensors 1%3A2.10.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,104 kB
  • ctags: 10,474
  • sloc: ansic: 61,469; perl: 7,544; sh: 1,491; makefile: 400; lex: 300; yacc: 291
file content (71 lines) | stat: -rw-r--r-- 2,488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.TH I2CSET 8 "September 2005"
.SH "NAME"
i2cset \- set I2C registers

.SH SYNOPSIS
.B i2cset
.RB [ -y ]
.I i2cbus
.I chip-address
.I data-address
.I value
.RI [ mode ]
.RI [ mask ]
.br
.B i2cset
.B -V

.SH DESCRIPTION
i2cset is a small helper program to set registers visible through the I2C
bus.

.SH OPTIONS
.TP
.B -V
Display the version and exit.
.TP
.B -y
Disable interactive mode. By default, i2cset will wait for a confirmation
from the user before messing with the I2C bus. When this flag is used, it
will perform the operation directly. This is mainly meant to be used in
scripts.
.PP
There are four required options to i2cset. \fIi2cbus\fR indicates the number
of the I2C bus to be scanned.  This number should correspond to one of
the busses listed by \fIi2cdetect -l\fR. \fIchip-address\fR specifies the
address of the chip on that bus, and is an integer between 0x00 and 0x7F.
\fIdata-address\fR specifies the address on that chip to write to, and is an
integer between 0x00 and 0xFF. \fIvalue\fR is the value to write to that
location on the chip.
.PP
The \fImode\fR parameter, if specified, is one of the letters \fBb\fP or
\fBw\fP, corresponding to a write size of a single byte or a 16-bit word,
respectively. A \fBp\fP can also be appended to the \fImode\fR parameter to
enable PEC. If the \fImode\fR parameter is omitted, i2cset defaults to byte
mode without PEC. The \fIvalue\fR provided must be within range for the
specified data type (0x00-0xFF for bytes, 0x0000-0xFFFF for words).
.PP
The \fImask\fR parameter, if specified, describes which bits of \fIvalue\fR
will be actually written to \fIdata-address\fR. Bits set to 1 in the mask
are taken from \fIvalue\fR, while bits set to 0 will be read from
\fIdata-address\fR and thus preserved by the operation.

.SH WARNING
i2cset can be extremely dangerous if used improperly. It can confuse your
I2C bus, cause data loss, or have more serious side effects. Writing to
a serial EEPROM on a memory DIMM (chip addresses between 0x50 and 0x57) may
DESTROY your memory, leaving your system unbootable!  Be extremely careful
using this program.

.SH CONFORMING TO
lm_sensors-2.x

.SH SEE ALSO
i2cdump(8), isaset(8)

.SH AUTHOR
Frodo Looijaard, Mark D. Studebaker, and the lm_sensors group
http://www.lm-sensors.org/
This manual page was originally written by David Z Maze <dmaze@debian.org> for
the Debian GNU/Linux system. It was then reviewed by the lm_sensors team and
is now part of the lm_sensors source distribution.