Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
65
IBASE Technology Inc.
if (!yes) {
fprintf(stderr, "Old value 0x%0*x, write mask "
"0x%0*x: Will write 0x%0*x to register "
"0x%02x\n",
size == I2C_SMBUS_WORD_DATA ? 4 : 2, oldvalue,
size == I2C_SMBUS_WORD_DATA ? 4 : 2, vmask,
size == I2C_SMBUS_WORD_DATA ? 4 : 2, value,
daddress);
fprintf(stderr, "Continue? [Y/n] ");
fflush(stderr);
if (!user_ack(1)) {
fprintf(stderr, "Aborting on user request.\n");
exit(0);
}
}
}
if (pec && ioctl(file, I2C_PEC, 1) < 0) {
fprintf(stderr, "Error: Could not set PEC: %s\n",
strerror(errno));
close(file);
exit(1);
}
switch (size) {
case I2C_SMBUS_BYTE:
res = i2c_smbus_write_byte(file, daddress);
break;
case I2C_SMBUS_WORD_DATA:
res = i2c_smbus_write_word_data(file, daddress, value);
break;
case I2C_SMBUS_BLOCK_DATA:
res = i2c_smbus_write_block_data(file, daddress, len, block);
break;
case I2C_SMBUS_I2C_BLOCK_DATA:
res = i2c_smbus_write_i2c_block_data(file, daddress, len, block);
break;
Summary of Contents for MRS-801-RE
Page 1: ...www ibase com tw IBASE Technology Inc MRS 801 RE User Manual...
Page 8: ......
Page 16: ...8 MRS 801 RE User Manual I O View Board Dimensions...
Page 40: ...32 MRS 801 RE User Manual...
Page 43: ...Copyright 2013 IBASE Technology Inc All Rights Reserved 35 IBASE Technology Inc...
Page 45: ...Copyright 2013 IBASE Technology Inc All Rights Reserved 37 IBASE Technology Inc...
Page 48: ...40 MRS 801 RE User Manual...
Page 52: ...44 MRS 801 RE User Manual sudo mkfs ext4 dev sdb1...
Page 54: ...46 MRS 801 RE User Manual tar xvf linux_bsp F600_linux_fs tgz...
Page 88: ...80 MRS 801 RE User Manual Version h define VERSION 3 1 1...