Read

Reads the OEM device data through the I2C bus of a GPU.

Syntax

Copied!

ADLX_RESULT     Read (ADLX_I2C_LINE  line, adlx_int speed, adlx_int address, adlx_int offset, adlx_int dataSize, adlx_byte* data)

Parameters

  1. [in] line ADLX_I2C_LINE The I2C line.

  2. [in] speed adlx_int The I2C clock speed (in KHz).

  3. [in] address adlx_int The 7-bit I2C slave device address which is shifted one bit to the left.

  4. [in] offset adlx_int The offset of the data from the address.

  5. [in] dataSize adlx_int The size (in bytes) of the buffer for the OEM device data.

  6. [in] data adlx_byte* The address to the buffer with the new OEM data.

Return Value

If the OEM device data is successfully returned, ADLX_OK is returned.

If the OEM device data is not successfully returned, an error code is returned.

Refer to ADLX_RESULT for success codes and error codes.

Remarks

The application is responsible to allocate a buffer sufficiently large to hold the requested OEM device data.

Requirements

Header

include “II2C.h”

Minimum version

1.0