public class SysFsDigitalOutputDevice extends AbstractDevice implements GpioDigitalOutputDeviceInterface
Constructor and Description |
---|
SysFsDigitalOutputDevice(SysFsDeviceFactory deviceFactory,
Path gpioDir,
String key,
int gpio,
boolean initialValue) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDevice() |
int |
getGpio() |
boolean |
getValue() |
void |
setValue(boolean value) |
close, getDeviceFactory, getKey, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getKey, isOpen
public SysFsDigitalOutputDevice(SysFsDeviceFactory deviceFactory, Path gpioDir, String key, int gpio, boolean initialValue)
public int getGpio()
getGpio
in interface GpioDeviceInterface
public boolean getValue() throws RuntimeIOException
getValue
in interface GpioDigitalDeviceInterface
RuntimeIOException
public void setValue(boolean value) throws RuntimeIOException
setValue
in interface GpioDigitalOutputDeviceInterface
RuntimeIOException
protected void closeDevice() throws RuntimeIOException
closeDevice
in class AbstractDevice
RuntimeIOException
Copyright © 2016–2017 mattjlewis. All rights reserved.