Package com.pi4j.io.gpio
Interface GpioPinDigitalInput
-
- All Superinterfaces:
GpioPin
,GpioPinDigital
,GpioPinInput
- All Known Subinterfaces:
GpioPinDigitalMultipurpose
- All Known Implementing Classes:
GpioPinImpl
public interface GpioPinDigitalInput extends GpioPinDigital, GpioPinInput
This is a decorator interface to describe digital input pin.- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDebounce(PinState state)
Gets the configured debounce delay interval (in milliseconds) for the given pin state.boolean
hasDebounce(PinState state)
Determines if a debounce delay interval has been configured for the given pin state.void
setDebounce(int debounce)
Sets the debounce delay interval (in milliseconds) for all pin states.void
setDebounce(int debounce, PinState... state)
Sets the debounce delay interval (in milliseconds) for the specified pin state.-
Methods inherited from interface com.pi4j.io.gpio.GpioPin
addListener, addListener, clearProperties, export, export, getListeners, getMode, getName, getPin, getProperties, getProperty, getProperty, getProvider, getPullResistance, getShutdownOptions, getTag, hasListener, hasProperty, isExported, isMode, isPullResistance, removeAllListeners, removeListener, removeListener, removeProperty, setMode, setName, setProperty, setPullResistance, setShutdownOptions, setShutdownOptions, setShutdownOptions, setShutdownOptions, setShutdownOptions, setTag, unexport
-
Methods inherited from interface com.pi4j.io.gpio.GpioPinDigital
getState, isHigh, isLow, isState
-
Methods inherited from interface com.pi4j.io.gpio.GpioPinInput
addTrigger, addTrigger, getTriggers, removeAllTriggers, removeTrigger, removeTrigger
-
-
-
-
Method Detail
-
hasDebounce
boolean hasDebounce(PinState state)
Determines if a debounce delay interval has been configured for the given pin state.- Parameters:
state
- the pin state to test for debounce delay.- Returns:
- 'true' if the specified ping state has been configured with a debounce delay; else return 'false'.
-
getDebounce
int getDebounce(PinState state)
Gets the configured debounce delay interval (in milliseconds) for the given pin state.- Parameters:
state
- the pin state to get the configured debounce delay interval.- Returns:
- the debounce delay interval (in milliseconds) for the specified pin state.
-
setDebounce
void setDebounce(int debounce)
Sets the debounce delay interval (in milliseconds) for all pin states.- Parameters:
debounce
- The debounce delay interval in milliseconds.
-
setDebounce
void setDebounce(int debounce, PinState... state)
Sets the debounce delay interval (in milliseconds) for the specified pin state.- Parameters:
debounce
- The debounce delay interval in milliseconds.state
- The pin states to apply the debounce delay interval to.
-
-