]> git.basschouten.com Git - openhab-addons.git/blob
abf6f6131bda14ebca76099b34c28eddf2e35abc
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.gpio.internal.configuration;
14
15 import static org.openhab.binding.gpio.internal.GPIOBindingConstants.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * The {@link GPIOInputConfiguration} class contains fields mapping thing configuration parameters.
21  *
22  * @author Nils Bauer - Initial contribution
23  * @author Martin Dagarin - Pull Up/Down GPIO pin
24  */
25 @NonNullByDefault
26 public class GPIOInputConfiguration extends GPIOConfiguration {
27     /**
28      * Time in ms to double check if value hasn't changed
29      */
30     public int debouncingTime = 10;
31
32     /**
33      * Setup a pullup resistor on the GPIO pin
34      * OFF = PI_PUD_OFF, DOWN = PI_PUD_DOWN, UP = PI_PUD_UP
35      */
36     public String pullupdown = PUD_OFF;
37
38     /**
39      * Sets the input detection type.
40      * EDGE_EITHER = PI_EITHER_EDGE, EDGE_FALLING = PI_FALLING_EDGE,
41      * EDGE_RISING = PI_RISING_EDGE
42      */
43     public String edgeMode = EDGE_EITHER;
44 }