
Software specification for Kontron EAPI
28
Parameters:
Handle of the selected board.
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:
Handle of the selected board.
Number of I2C Buses. From 0 to (I2cBusCount - 1) returned
by KEApiGetI2cBusCount.
Address of I2C slave device
Address of register/memory (EEPROM cell address for
example). Depends on device.
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:
Handle of the selected board.
Number of I2C Buses. From 0 to (I2cBusCount - 1)
returned by KEApiGetI2cBusCount.
Address of I2C slave device
Address of register/memory (EEPROM cell address for
example). Depends on device.
If TRUE – function reads data from address in
MemoryAddress parameter. Otherwise – from a current
position index (depends on device).
Komentarze do niniejszej Instrukcji