Skip to content

Read

Navigation: ADLX SDK ReferencesADLX InterfacesI2CIADLXI2C

Syntax

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

Parameters

#DirectionNameTypeDescription
1.[in]lineADLX_I2C_LINEThe I2C line.
#DirectionNameTypeDescription
---------------
2.[in]speedadlx_intThe I2C clock speed (in KHz).
#DirectionNameTypeDescription
---------------
3.[in]addressadlx_intThe 7-bit I2C slave device address which is shifted one bit to the left.
#DirectionNameTypeDescription
---------------
4.[in]offsetadlx_intThe offset of the data from the address.
#DirectionNameTypeDescription
---------------
5.[in]dataSizeadlx_intThe size (in bytes) of the buffer for the OEM device data.
#DirectionNameTypeDescription
---------------
6.[in]dataadlx_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

Headerinclude “II2C.h”
Minimum version1.0

See Also: ADLX Enums