64
MRS-801-RE User Manual
if (((size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA)
&& vmask > 0xff) || vmask > 0xffff) {
fprintf(stderr, "Error: Data value mask out of range!\n");
help();
}
}
file = open_i2c_dev(i2cbus, filename, sizeof(filename), 0);
if (file < 0
|| check_funcs(file, size, pec)
|| set_slave_addr(file, address, force))
exit(1);
if (!yes && !confirm(filename, address, size, daddress,
value, vmask, block, len, pec))
exit(0);
if (vmask) {
int oldvalue;
switch (size) {
case I2C_SMBUS_BYTE:
oldvalue = i2c_smbus_read_byte(file);
break;
case I2C_SMBUS_WORD_DATA:
oldvalue = i2c_smbus_read_word_data(file, daddress);
break;
default:
oldvalue = i2c_smbus_read_byte_data(file, daddress);
}
if (oldvalue < 0) {
fprintf(stderr, "Error: Failed to read old value\n");
exit(1);
}
value = (value & vmask) | (oldvalue & ~vmask);
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...