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

Write I2C register.

Write a single byte to 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 to which to write a single byte.
valThe byte to write to the I2C device.
Returns
A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values.
Examples:
ex_writei2cregister.nxc.