Package com.diozero.devices.mcp23xxx
Class MCP23xxxDigitalInputDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.spi.AbstractInputDevice<DigitalInputEvent>
-
- com.diozero.devices.mcp23xxx.MCP23xxxDigitalInputDevice
-
- All Implemented Interfaces:
DeviceInterface
,GpioDeviceInterface
,GpioDigitalDeviceInterface
,GpioDigitalInputDeviceInterface
,InternalDeviceInterface
,AutoCloseable
public class MCP23xxxDigitalInputDevice extends AbstractInputDevice<DigitalInputEvent> implements GpioDigitalInputDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description MCP23xxxDigitalInputDevice(MCP23xxx mcp23xxx, String key, int gpio, GpioEventTrigger trigger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeDevice()
int
getGpio()
boolean
getValue()
void
setDebounceTimeMillis(int debounceTime)
-
Methods inherited from class com.diozero.internal.spi.AbstractInputDevice
accept, disableListener, enableListener, generatesEvents, isListenerEnabled, removeListener, setListener
-
Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isChild, isOpen, setChild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
Methods inherited from interface com.diozero.internal.spi.GpioDigitalInputDeviceInterface
getMode, removeListener, setListener
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
-
-
-
Constructor Detail
-
MCP23xxxDigitalInputDevice
public MCP23xxxDigitalInputDevice(MCP23xxx mcp23xxx, String key, int gpio, GpioEventTrigger trigger)
-
-
Method Detail
-
closeDevice
protected void closeDevice() throws RuntimeIOException
- Overrides:
closeDevice
in classAbstractInputDevice<DigitalInputEvent>
- Throws:
RuntimeIOException
-
getValue
public boolean getValue() throws RuntimeIOException
- Specified by:
getValue
in interfaceGpioDigitalDeviceInterface
- Throws:
RuntimeIOException
-
getGpio
public int getGpio()
- Specified by:
getGpio
in interfaceGpioDeviceInterface
-
setDebounceTimeMillis
public void setDebounceTimeMillis(int debounceTime)
- Specified by:
setDebounceTimeMillis
in interfaceGpioDigitalInputDeviceInterface
-
-