From: RussellMorin <rm...@wp...> - 2008-10-22 21:21:45
|
Hello, I run the following code: (before main) #define TCCR1A 0x4F (in main) const char *i2cDevName = "/dev/i2c-0"; int i2cDev = -1; int gI2cAddr = 0x0b; if (( i2cDev = open( i2cDevName, O_RDWR )) < 0 ) { printf( "Error opening '%s': %s\n", i2cDevName, strerror( errno )); exit( 1 ); } // Indicate which device we wish to speak to I2cSetSlaveAddress( i2cDev, gI2cAddr, I2C_USE_CRC ); // Setup the timers I2C_IO_WriteReg8(i2cDev, TCCR1A, 0xAA); And I get the following error: ERROR: I2cTransfer: ioctl failed: Remote I/O error (121) ERROR: I2C_IO_WriteReg8: I2cWriteBlockFailed: Remote I/O error (121) I've tried several different permutations of the last line of code and looked through the servo code in the forums, but I can't get the program to write to the register. Any help would be greatly appreciated. Thanks, -Russ Morin -- View this message in context: http://www.nabble.com/I2C_IO_WriteReg-Problem-tp20120031p20120031.html Sent from the Gumstix mailing list archive at Nabble.com. |