Changeset 5393
- Timestamp:
- 11/20/08 20:41:19 (4 years ago)
- Location:
- i2c-tools/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
tools/i2cset.8 (modified) (2 diffs)
-
tools/i2cset.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/CHANGES
r5390 r5393 24 24 Better error message on missing adapter functionality 25 25 Set the data value mask with -m 26 Make reading back the written value optional 26 27 i2c-stub-from-dump: Add support for partial dumps 27 28 Report if only garbage is found in dump file -
i2c-tools/trunk/tools/i2cset.8
r5392 r5393 8 8 .RB [ -y ] 9 9 .RB [ "-m mask" ] 10 .RB [ -r ] 10 11 .I i2cbus 11 12 .I chip-address … … 47 48 mode are symmetrical for the device you are accessing. This may or may not 48 49 be the case, as neither I2C nor SMBus guarantees this. 50 .TP 51 .B -r 52 Read back the value right after writing it, and compare the result with the 53 value written. This used to be the default behavior. The same limitations 54 apply as those of option \fB-m\fR. 49 55 .PP 50 56 There are three required options to i2cset. \fIi2cbus\fR indicates the number -
i2c-tools/trunk/tools/i2cset.c
r5391 r5393 135 135 int pec = 0; 136 136 int flags = 0; 137 int force = 0, yes = 0, version = 0 ;137 int force = 0, yes = 0, version = 0, readback = 0; 138 138 139 139 /* handle (optional) flags first */ … … 148 148 flags++; 149 149 break; 150 case 'r': readback = 1; break; 150 151 default: 151 152 fprintf(stderr, "Error: Unsupported option " … … 307 308 exit(1); 308 309 } 310 } 311 312 if (!readback) { /* We're done */ 313 close(file); 314 exit(0); 309 315 } 310 316
