Keapii2cwrite, Keapii2cread, 2 keapii2cwrite – Kontron KEAPI User Manual
Page 28: 3 keapii2cread

Software specification for Kontron EAPI
28
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
out
pI2cBusCount
Pointer to the variable where the I2C bus count is saved
2.14.2 KEApiI2cWrite
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiI2cWrite (
KEAPI_UINT32
boardHandle,
KEAPI_UCHAR
i2cNr,
KEAPI_UCHAR
i2cAddress,
KEAPI_UCHAR
memoryAddress,
KEAPI_PUCHAR
pData,
KEAPI_UINT32
dataLength
);
Description:
This function writes data to the slave I2C device connected to the I2C bus.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
in
i2cNr
Number of I2C Buses. From 0 to (I2cBusCount - 1) returned
by KEApiGetI2cBusCount.
in
i2cAddress
Address of I2C slave device
in
memoryAddress
Address of register/memory (EEPROM cell address for
example). Depends on device.
in
pData
Data to write
in
dataLength
Length of data to write
2.14.3 KEApiI2cRead
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiI2cRead (
KEAPI_UINT32
boardHandle,
KEAPI_UCHAR
i2cNr,
KEAPI_UCHAR
i2cAddress,
KEAPI_UCHAR
memoryAddress,
KEAPI_BOOL
memoryAddressUsed,
KEAPI_PUCHAR
pData,
KEAPI_PUINT32
pDataLength
);
Description:
This function reads data from the slave I2C device connected to the I2C bus.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
in
i2cNr
Number of I2C Buses. From 0 to (I2cBusCount - 1)
returned by KEApiGetI2cBusCount.
in
i2cAddress
Address of I2C slave device
in
memoryAddress
Address of register/memory (EEPROM cell address for
example). Depends on device.
in
memoryAddressUsed
If TRUE
– function reads data from address in
MemoryAddress parameter. Otherwise
– from a current
position index (depends on device).
out
pData
Buffer for read data