NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char ReadI2CRegister ( byte  port,
byte  i2caddr,
byte  reg,
byte &  out 
)
inline

Read I2C register.

Read a single byte from an I2C device register.

Parameters
portThe port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable.
i2caddrThe I2C device address.
regThe I2C device register from which to read a single byte.
outThe single byte read from the I2C device.
Returns
A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values.
Examples:
ex_readi2cregister.nxc.