Grabber::execI2COperation Method

Performs a read/write operation on the I²C bus of the currently used video capture device.
Syntax:
bool    execI2COperation( int dev_addr, void* write_buffer, int write_len, void* read_buffer, int read_len );
Parameter Description
dev_addr

The address of the I²C slave on the device to be communicated with. The address value depends on the used hardware, and is specified in its 7-bit form.

write_buffer

The data to write. The buffer size has to be at least write_len bytes. This pointer can be NULL, if write_len is 0.

write_len

The amount of bytes the that should be sent to the I²C slave. This value may be 0.

read_buffer

A buffer to receive the data read from the I²C slave. The buffer has to have a size of at least read_len bytes. This pointer can be NULL, if read_len is 0.

read_len

The number of byte to be read from the I²C slave. This value may be 0.

Return value:

Value Description
true The operation was successful.
false The operation failed.

Remarks:

This function gives access to internal parts of the video capture device. Please do not use it unless you have additional documentation about the specific I²C slave you are communicating with.

Information:

Introduced in version 3.4

See also: Grabber, Grabber::hasI2CInterface

<< Grabber