User guide

Software specification for Kontron EAPI
32
2.15.8 KEApiSmbusReadWord
KEAPI_CALLTYPE KEAPI_UINT32 KEApiSmbusReadWord (
KEAPI_UINT32 boardHandle,
KEAPI_UCHAR smbusNr,
KEAPI_UCHAR smbusAddress,
KEAPI_UCHAR command,
KEAPI_PUINT16 pWord
);
Description:
This function reads data of size of word from a device. For additional information, refer to the System
Management Bus (SMBus) Specification Version 2.0, which is available at
http://smbus.org/specs/smbus20.pdf.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
in
smbusNr
Number of SMBus. From 0 to (SmbusCount - 1) returned by
KEApiGetSmbusCount.
in
smbusAddress
Address of SMBus slave device
in
command
Command code. Depends on device
out
pWord
Pointer to the data value
2.15.9 KEApiSmbusWriteBlock
KEAPI_CALLTYPE KEAPI_UINT32 KEApiSmbusWriteBlock (
KEAPI_UINT32 boardHandle,
KEAPI_UCHAR smbusNr,
KEAPI_UCHAR smbusAddress,
KEAPI_UCHAR command,
KEAPI_PUCHAR pData,
KEAPI_UCHAR dataLength
);
Description:
This function writes up to 32 bytes to the device. For additional information, refer to the System
Management Bus (SMBus) Specification Version 2.0, which is available at
http://smbus.org/specs/smbus20.pdf.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
in
smbusNr
Number of SMBus. From 0 to (SmbusCount - 1) returned by
KEApiGetSmbusCount.
in
smbusAddress
Address of SMBus slave device
in
command
Command code. Depends on device
in
pData
Pointer to a data block of size up to 32 bytes
in
dataLength
Length of a data block
2.15.10 KEApiSmbusReadBlock
KEAPI_CALLTYPE KEAPI_UINT32 KEApiSmbusReadBlock (
KEAPI_UINT32 boardHandle,
KEAPI_UCHAR smbusNr,
KEAPI_UCHAR smbusAddress,
KEAPI_UCHAR command,