![background image](http://html1.mh-extra.com/html/ibase-technology/mrs-801-re/mrs-801-re_user-manual_3238201085.webp)
Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
77
IBASE Technology Inc.
if (file < 0 && (errno == ENOENT || errno == ENOTDIR)) {
sprintf(filename, "/dev/i2c-%d", i2cbus);
file = open(filename, O_RDWR);
}
if (file < 0 && !quiet) {
if (errno == ENOENT) {
fprintf(stderr, "Error: Could not open file "
"`/dev/i2c-%d' or `/dev/i2c/%d': %s\n",
i2cbus, i2cbus, strerror(ENOENT));
} else {
fprintf(stderr, "Error: Could not open file "
"`%s': %s\n", filename, strerror(errno));
if (errno == EACCES)
fprintf(stderr, "Run as root?\n");
}
}
return file;
}
int set_slave_addr(int file, int address, int force)
{
/* With force, let the user read from/write to the registers
even when a driver is also running */
if (ioctl(file, force ? I2C_SLAVE_FORCE : I2C_SLAVE, address) < 0) {
fprintf(stderr,
"Error: Could not set address to 0x%02x: %s\n",
address, strerror(errno));
return -errno;
}
return 0;
}
/*
i2cbusses.h
*/
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...