DlnGpioPinDebounceIsEnabled() Function

The DlnGpioPinDebounceIsEnabled() function informs whether the Debounce Filter is currently enabled for the specified pin.

Syntax
C/C++
DLN_RESULT DlnGpioPinOpendrainIsEnabled(
   HDLN handle,
   uint8_t pin,
   uint8_t* enabled
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin that you want to check.

enabled

A pointer to an unsigned 8-bit integer. After the function execution, this parameter is set to one of the following values:

ValueDescription

1

Debounce filtering is active.

0

Debounce filtering is not active.

Return Value
DLN_RES_SUCCESS (0x00)

The function retrieves the debounce filter settings successfully.

DLN_RES_INVALID_PIN_NUMBER ( 0xAB)

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

DLN_RES_COMMAND_NOT_SUPPORTED (0x91)

The adapter does not support debounce filtering.

Remarks

The DlnGpioPinDebounceIsEnabled() function returns whether or not the debounce filtering feature is enabled for the specified pin. To enable this feature, use the DlnGpioPinDebounceEnable() function. To disable this feature, use the DlnGpioPinDebounceDisable() function. To specify the debounce interval, use the DlnGpioSetDebounce() function (See Debounce Filter for details).

DLN-1, DLN-2 adapters do not support the debounce filter feature.

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