How do I know whether this function returns a TRUE or FALSE?
As of Arduino 1.0.1, endTransmission() accepts a boolean argument changing its behavior for compatibility with certain I2C devices.
If true, endTransmission() sends a stop message after transmission, releasing the I2C bus.
If false, endTransmission() sends a restart message after transmission. The bus will not be released, which prevents another master device from transmitting between messages. This allows one master device to send multiple transmissions while in control.
The default value is true.
I'm using it in this piece of code from the Li Power Shield example code. I imagine that only 1 line of code using Wire.write(); is necessary, right?
/************************************************************************
5. i2cWrite16(unsigned int data, unsigned char address) writes 16 bits
of data beginning at an 8-bit address, and continuing to the next.
************************************************************************/
void i2cWrite16(unsigned int data, unsigned char address)
{
Wire.beginTransmission(MAX17043_ADDRESS);
Wire.write(address);
//Wire.write((byte)((data >> 8) & 0x00FF));
//Wire.write((byte)(data & 0x00FF));
Wire.endTransmission();
}