76
MRS-801-RE User Manual
fprintf(stderr, "Error: I2C bus out of range!\n");
return -2;
}
return i2cbus;
}
/*
* Parse a CHIP-ADDRESS command line argument and return the corresponding
* chip address, or a negative value if the address is invalid.
*/
int parse_i2c_address(const char *address_arg)
{
long address;
char *end;
address = strtol(address_arg, &end, 0);
if (*end || !*address_arg) {
fprintf(stderr, "Error: Chip address is not a number!\n");
return -1;
}
if (address < 0x03 || address > 0x77) {
fprintf(stderr, "Error: Chip address out of range "
"(0x03-0x77)!\n");
return -2;
}
return address;
}
int open_i2c_dev(int i2cbus, char *filename, size_t size, int quiet)
{
int file;
snprintf(filename, size, "/dev/i2c/%d", i2cbus);
filename[size - 1] = '\0';
file = open(filename, O_RDWR);
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...