USB-I2C/SPI/GPIO Interface Adapters
Published on USB-I2C/SPI/GPIO Interface Adapters (https://dlnware.com)

Home > C/C++ API > GPIO Interface > GPIO Interface Functions > DlnGpioPinGetEventCfg() Function

DlnGpioPinGetEventCfg() Function

The DlnGpioPinGetEventCfg() function retrieves the current event configuration for the specified pin. For more information, read Digital Input Events [1].

Syntax
C/C++
DLN_RESULT DlnGpioPinGetEventCfg(
   HDLN handle, 
   uint8_t pin, 
   uint8_t* eventType,
   uint16_t* eventPeriod
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin that you want to check.

eventType

A pointer to an unsigned 8-bit integer. After the function execution, this integer is set to the current event configuration of the pin.

eventPeriod

A pointer to an unsigned 16-bit integer. After the function execution, this integer is set to the interval at which the specified events occur.

Return Value
DLN_RES_SUCCESS (0x00)

The function retrieved the event configuration successfully.

DLN_RES_INVALID_PIN_NUMBER (0xAB)

The pin number is not valid. Use the DlnGpioGetPinCount() [2] function to find the maximum possible pin number.

Remarks
GPIO events are by the DLN-1 adapters.

The DlnGpioPinGetEventCfg() function is declared in the dln_gpio.h file.


Links:
[1] http://dlnware.com/dll/Digital-Input-Events
[2] http://dlnware.com/dll/DlnGpioGetPinCount