Changeset 5203
- Timestamp:
- 04/24/08 14:32:16 (5 years ago)
- Location:
- i2c-tools/trunk
- Files:
-
- 6 modified
-
CHANGES (modified) (1 diff)
-
tools/i2cdump.8 (modified) (1 diff)
-
tools/i2cdump.c (modified) (2 diffs)
-
tools/i2cget.c (modified) (2 diffs)
-
tools/i2cset.8 (modified) (1 diff)
-
tools/i2cset.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/CHANGES
r5201 r5203 8 8 i2cdump: Support i2c bus passed by name 9 9 Shorten the usage message 10 Restrict the chip address to 0x03-0x77 10 11 i2cget: Support i2c bus passed by name 11 12 Shorten the usage message 12 13 i2cset: Support i2c bus passed by name 13 14 Shorten the usage message 15 Restrict the chip address to 0x03-0x77 14 16 15 17 3.0.1 (2008-04-04) -
i2c-tools/trunk/tools/i2cdump.8
r5195 r5203 46 46 number or name of the I2C bus to be scanned. This number should correspond to one 47 47 of the busses listed by \fIi2cdetect -l\fR. \fIaddress\fR indicates the 48 address to be scanned on that bus, and is an integer between 0x0 0 and 0x7F.48 address to be scanned on that bus, and is an integer between 0x03 and 0x77. 49 49 .PP 50 50 The \fImode\fR parameter, if specified, is one of the letters \fBb\fP, \fBw\fP, -
i2c-tools/trunk/tools/i2cdump.c
r5201 r5203 36 36 "Usage: i2cdump [-f] [-y] [-r first-last] I2CBUS ADDRESS [MODE] [BANK [BANKREG]]\n" 37 37 " I2CBUS is an integer or an I2C bus name\n" 38 " ADDRESS is an integer (0x0 0 - 0x7f)\n"38 " ADDRESS is an integer (0x03 - 0x77)\n" 39 39 " MODE is one of:\n" 40 40 " b (byte, default)\n" … … 104 104 exit(1); 105 105 } 106 if (address < 0 || address > 0x7f) {106 if (address < 0x03 || address > 0x77) { 107 107 fprintf(stderr, "Error: Address out of range!\n"); 108 108 help(); -
i2c-tools/trunk/tools/i2cget.c
r5201 r5203 1 1 /* 2 2 i2cget.c - A user-space program to read an I2C register. 3 Copyright (C) 2005 Jean Delvare <khali@linux-fr.org>3 Copyright (C) 2005-2008 Jean Delvare <khali@linux-fr.org> 4 4 5 5 Based on i2cset.c: … … 191 191 192 192 address = strtol(argv[flags+2], &end, 0); 193 if (*end || address < 3 || address > 0x77) {193 if (*end || address < 0x03 || address > 0x77) { 194 194 fprintf(stderr, "Error: Chip address invalid!\n"); 195 195 help(); -
i2c-tools/trunk/tools/i2cset.8
r5195 r5203 43 43 or name of the I2C bus to be scanned. This number should correspond to one of 44 44 the busses listed by \fIi2cdetect -l\fR. \fIchip-address\fR specifies the 45 address of the chip on that bus, and is an integer between 0x0 0 and 0x7F.45 address of the chip on that bus, and is an integer between 0x03 and 0x77. 46 46 \fIdata-address\fR specifies the address on that chip to write to, and is an 47 47 integer between 0x00 and 0xFF. \fIvalue\fR is the value to write to that -
i2c-tools/trunk/tools/i2cset.c
r5201 r5203 3 3 Copyright (C) 2001-2003 Frodo Looijaard <frodol@dds.nl>, and 4 4 Mark D. Studebaker <mdsxyz123@yahoo.com> 5 Copyright (C) 2004-200 5Jean Delvare <khali@linux-fr.org>5 Copyright (C) 2004-2008 Jean Delvare <khali@linux-fr.org> 6 6 7 7 This program is free software; you can redistribute it and/or modify … … 38 38 "Usage: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS VALUE [MODE] [MASK]\n" 39 39 " I2CBUS is an integer or an I2C bus name\n" 40 " ADDRESS is an integer (0x0 0 - 0x7f)\n"40 " ADDRESS is an integer (0x03 - 0x77)\n" 41 41 " MODE is one of:\n" 42 42 " b (byte, default)\n" … … 85 85 86 86 address = strtol(argv[flags+2], &end, 0); 87 if (*end || address < 0 || address > 0x7f) {87 if (*end || address < 0x03 || address > 0x77) { 88 88 fprintf(stderr, "Error: Chip address invalid!\n"); 89 89 help();
