Gpio, Keapigpiogetcount, Keapigpiogetdirectioncaps – Kontron KEAPI User Manual
Page 33: 16 gpio, 1 keapigpiogetcount, 2 keapigpiogetdirectioncaps

Software specification for Kontron EAPI
33
KEAPI_PUCHAR
pData,
KEAPI_PUCHAR
pDataLength
);
Description:
This function reads up to 32 byte from 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
out
pData
Pointer to a data block of size up to 32 bytes
in/ out
pDataLength
This is also the "out" parameter. It is a pointer to the length of
data to read. After completing the function, this parameter
contains real value of the data length.
2.16 GPIO
2.16.1 KEApiGpioGetCount
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiGpioGetCount (
KEAPI_UINT32
boardHandle,
KEAPI_PUINT32
pGpioCount
);
Description:
Function for getting number of active GPIOs.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
out
pGpioCount
Pointer to a variable where the GPIO count is saved
2.16.2 KEApiGpioGetDirectionCaps
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiGpioGetDirectionCaps (
KEAPI_UINT32
boardHandle,
KEAPI_UINT32
gpioNr,
KEAPI_PBOOL
pIsInput,
KEAPI_PBOOL
pIsOutput
);
Description:
Function to get possible directions of a selected GPIO.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board.
in
gpioNr
Number of a GPIO port. From 0 to (GpioCount - 1) returned