Package com.diozero.devices.mcp23xxx
Class MCP23xxxDigitalInputOutputDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.spi.AbstractInputDevice<DigitalInputEvent>
com.diozero.devices.mcp23xxx.MCP23xxxDigitalInputOutputDevice
- All Implemented Interfaces:
DeviceInterface
,GpioDeviceInterface
,GpioDigitalDeviceInterface
,GpioDigitalInputOutputDeviceInterface
,GpioDigitalOutputDeviceInterface
,Closeable
,AutoCloseable
public class MCP23xxxDigitalInputOutputDevice extends AbstractInputDevice<DigitalInputEvent> implements GpioDigitalInputOutputDeviceInterface
-
Constructor Summary
Constructors Constructor Description MCP23xxxDigitalInputOutputDevice(MCP23xxx mcp23xxx, String key, int gpio, DeviceMode mode)
-
Method Summary
Modifier and Type Method Description protected void
closeDevice()
int
getGpio()
DeviceMode
getMode()
boolean
getValue()
void
setMode(DeviceMode mode)
void
setValue(boolean value)
Methods inherited from class com.diozero.internal.spi.AbstractInputDevice
accept, disableListener, enableListener, generatesEvents, removeListener, setListener
Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isOpen
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, getKey, isOpen
Methods inherited from interface com.diozero.internal.spi.GpioDigitalInputOutputDeviceInterface
removeListener, setListener
-
Constructor Details
-
MCP23xxxDigitalInputOutputDevice
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfaceGpioDigitalDeviceInterface
- Throws:
RuntimeIOException
-
setValue
- Specified by:
setValue
in interfaceGpioDigitalOutputDeviceInterface
- Throws:
RuntimeIOException
-
getGpio
public int getGpio()- Specified by:
getGpio
in interfaceGpioDeviceInterface
-
closeDevice
- Specified by:
closeDevice
in classAbstractDevice
- Throws:
RuntimeIOException
-
getMode
- Specified by:
getMode
in interfaceGpioDeviceInterface
- Specified by:
getMode
in interfaceGpioDigitalOutputDeviceInterface
-
setMode
- Specified by:
setMode
in interfaceGpioDigitalInputOutputDeviceInterface
-