Changeset 1244
- Timestamp:
- 11/19/01 22:14:43 (12 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/dump/i2cdump.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r1243 r1244 21 21 Library: Add PCF8591 support 22 22 Module pcf8591: new 23 Program i2cdump: Add i2c block read capability 23 24 Program sensors: Add PCF8591 support 24 25 Program sensors-detect: Add several Nvidia chips, add PCF8591 -
lm-sensors/trunk/prog/dump/i2cdump.c
r1053 r1244 26 26 #include <fcntl.h> 27 27 #include <linux/i2c-dev.h> 28 29 /* 30 We don't use this #define but it was put into i2c.h at the same time as 31 i2c_smbus_read_i2c_block_data() was implemented (i2c 2.6.3), 32 so we use it as a version check. 33 */ 34 #if defined(I2C_FUNC_SMBUS_READ_I2C_BLOCK_2) 35 #define USE_I2C_BLOCK 1 36 #else 37 #define USE_I2C_BLOCK 0 38 #endif 39 28 40 29 41 void help(void) … … 257 269 res = i2c_smbus_read_block_data(file,0,cblock); 258 270 } else if(size == I2C_SMBUS_I2C_BLOCK_DATA) { 259 /* 271 #if USE_I2C_BLOCK 260 272 res = i2c_smbus_read_i2c_block_data(file,0,cblock); 261 */ 273 #else 262 274 fprintf(stderr, "Error: I2C block read unimplemented\n"); 263 275 exit(1); 264 } 265 if(res < 0) { 276 #endif 277 } 278 if(res <= 0) { 266 279 fprintf(stderr, "Error: Block read failed, return code %d\n", res); 267 280 exit(1);
