Class SysFsDigitalOutputDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.builtin.SysFsDigitalOutputDevice
- All Implemented Interfaces:
DeviceInterface
,GpioDeviceInterface
,GpioDigitalDeviceInterface
,GpioDigitalOutputDeviceInterface
,InternalDeviceInterface
,AutoCloseable
public class SysFsDigitalOutputDevice extends AbstractDevice implements GpioDigitalOutputDeviceInterface
-
Constructor Summary
Constructors Constructor Description SysFsDigitalOutputDevice(DefaultDeviceFactory deviceFactory, String key, PinInfo pinInfo, boolean initialValue, MmapGpioInterface mmapGpio)
-
Method Summary
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, 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
Methods inherited from interface com.diozero.internal.spi.GpioDigitalOutputDeviceInterface
getMode
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isOpen
-
Constructor Details
-
SysFsDigitalOutputDevice
public SysFsDigitalOutputDevice(DefaultDeviceFactory deviceFactory, String key, PinInfo pinInfo, boolean initialValue, MmapGpioInterface mmapGpio)
-
-
Method Details
-
getGpio
public int getGpio()- Specified by:
getGpio
in interfaceGpioDeviceInterface
-
getValue
- Specified by:
getValue
in interfaceGpioDigitalDeviceInterface
- Throws:
RuntimeIOException
-
setValue
- Specified by:
setValue
in interfaceGpioDigitalOutputDeviceInterface
- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevice
in classAbstractDevice
- Throws:
RuntimeIOException
-