NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
long I2CSendCommand ( byte  port,
byte  i2caddr,
byte  cmd 
)
inline

Send an I2C command.

Send a command to an I2C device at the standard command register: I2C_REG_CMD. The I2C device uses the specified address.

Parameters
portThe port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads.
i2caddrThe I2C device address.
cmdThe command to send to the I2C device.
Returns
A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values.
Examples:
ex_I2CSendCommand.nxc.