Package com.diozero.devices.mcp23xxx
Class MCP23xxxDigitalOutputDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.devices.mcp23xxx.MCP23xxxDigitalOutputDevice
-
- All Implemented Interfaces:
DeviceInterface
,GpioDeviceInterface
,GpioDigitalDeviceInterface
,GpioDigitalOutputDeviceInterface
,InternalDeviceInterface
,AutoCloseable
public class MCP23xxxDigitalOutputDevice extends AbstractDevice implements GpioDigitalOutputDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description MCP23xxxDigitalOutputDevice(MCP23xxx mcp23xxx, String key, int gpio, boolean initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeDevice()
int
getGpio()
boolean
getValue()
void
setValue(boolean value)
-
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.GpioDigitalOutputDeviceInterface
getMode
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
-
-
-
Method Detail
-
getValue
public boolean getValue() throws RuntimeIOException
- Specified by:
getValue
in interfaceGpioDigitalDeviceInterface
- Throws:
RuntimeIOException
-
setValue
public void setValue(boolean value) throws RuntimeIOException
- Specified by:
setValue
in interfaceGpioDigitalOutputDeviceInterface
- Throws:
RuntimeIOException
-
getGpio
public int getGpio()
- Specified by:
getGpio
in interfaceGpioDeviceInterface
-
closeDevice
protected void closeDevice() throws RuntimeIOException
- Specified by:
closeDevice
in classAbstractDevice
- Throws:
RuntimeIOException
-
-