Вы здесь

DlnGpioPinDebounceEnable() Function

The DlnGpioPinDebounceEnable() function enables Debounce Filter for the specified pin.

Syntax
C/C++
DLN_RESULT DlnGpioPinDebounceEnable(
   HDLN handle,
   uint8_t pin
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin that you want to configure.

Return Value
DLN_RES_SUCCESS ( 0x00)

The function activated the debounce filter 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

You can use the DlnGpioPinDebounceEnable() function regardless of whether or not the specified pin is connected to the GPIO module. For a disconnected pin, the debounce filter configuration is saved in the internal memory. This value will be applied when the pin is connected to the GPIO module.

The debounce filter feature is not supported by DLN-1 and DLN-2 adapters.

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

Языки

Вход на сайт