You are here

DlnGpioSetDebounce() Function

The DlnGpioSetDebounce() function specifies the debounce interval (the minimum duration of pulses to be registered). See Debounce Filter for details.

DLN_RESULT DlnGpioSetDebounce(
   HDLN handle, 
   uint32_t* duration

A handle to the DLN-series adapter.


A pointer to an unsigned 32-bit integer. After the function execution, this integer is set to the debounce duration, rounded up to the nearest value supported by the adapter. See Debounce Filter for details.

Return Value

The function specified the debounce interval successfully.


The adapter does not support debounce filtering.


The specified debounce interval is actual for all pins where the debounce filter is enabled. This value should be specified in microseconds (µs): from 1µs up to 4,294,967,295µs (~1h 10m). If a DLN-series adapter does not support the specified value, it rounds it up to the nearest supported value.

The default value of the debounce interval depends on the DLN adapter. Once you call the DlnGpioSetDebounce() function and specify the debounce interval value, you change the default value. If the debounce filter is disabled for a pin or a pin is not assigned to the GPIO module, this value will be applied when the pin is assigned to the GPIO module with the debounce filter enabled.

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

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



User login