#define ReadI2CBytes ( _port,
_inbuf,
_count,
_outbuf,
_result   )     __ReadI2CBytes(_port, _inbuf, _count, _outbuf, _result)

Perform an I2C write/read transaction.

This method writes the bytes contained in the input buffer (inbuf) to the I2C device on the specified port, checks for the specified number of bytes to be ready for reading, and then tries to read the specified number (count) of bytes from the I2C device into the output buffer (outbuf).

This is a higher-level wrapper around the three main I2C functions. It also maintains a "last good read" buffer and returns values from that buffer if the I2C communication transaction fails.

Parameters:
_port The port to which the I2C device is attached. See the NBC 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.
_inbuf A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specified register.
_count The number of bytes that should be returned by the I2C device. On output count is set to the number of bytes in outbuf.
_outbuf A byte array that contains the data read from the internal I2C buffer.
_result Returns true or false indicating whether the I2C transaction succeeded or failed.
See also:
LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus

Generated by  doxygen 1.6.2