4 #if 0 || FIND_OPERATOR_PRECEDING_INCONSISTANCY
6 #define PCF8591_ID 0x90;
9 unsigned char ReadPCF8591(char address, char channel) {
11 unsigned char id=PCF8591_ID+address<<1;
14 //fprintf (stderr, "I2C bus busy, retrying.\n");
17 // set output enable, no autoincrement
18 i2cTransmitBuffer[0]=channel&0x03+0x40;
20 // read 2 bytes, since the first one is the old value
21 if (I2CSendReceive(id, 1, 2))
24 return i2cReceiveBuffer[1];