![background image](http://html1.mh-extra.com/html/ibase-technology/mrs-801-re/mrs-801-re_user-manual_3238201063.webp)
Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
55
IBASE Technology Inc.
if (!yes && !confirm(filename, address, size, daddress, pec))
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:
if (daddress >= 0) {
res = i2c_smbus_write_byte(file, daddress);
if (res < 0)
fprintf(stderr, "Warning - write failed\n");
}
res = i2c_smbus_read_byte(file);
break;
case I2C_SMBUS_WORD_DATA:
res = i2c_smbus_read_word_data(file, daddress);
break;
default: /* I2C_SMBUS_BYTE_DATA */
res = i2c_smbus_read_byte_data(file, daddress);
}
close(file);
if (res < 0) {
fprintf(stderr, "Error: Read failed\n");
exit(2);
}
printf("0x%0*x\n", size == I2C_SMBUS_WORD_DATA ? 4 : 2, res);
exit(0);
}
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...