public class RaspiGpioProvider extends GpioProviderBase implements GpioProvider, GpioInterruptListener
GpioProvider
implementation.Modifier and Type | Field and Description |
---|---|
static String |
NAME |
cache, isshutdown, listeners
Constructor and Description |
---|
RaspiGpioProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Pin pin,
PinListener listener) |
void |
export(Pin pin,
PinMode mode) |
void |
export(Pin pin,
PinMode mode,
PinState defaultState) |
PinMode |
getMode(Pin pin) |
String |
getName() |
PinPullResistance |
getPullResistance(Pin pin) |
int |
getPwm(Pin pin) |
PinState |
getState(Pin pin) |
double |
getValue(Pin pin) |
boolean |
hasPin(Pin pin) |
boolean |
isExported(Pin pin) |
void |
pinStateChange(GpioInterruptEvent event) |
void |
removeListener(Pin pin,
PinListener listener) |
void |
setMode(Pin pin,
PinMode mode) |
void |
setPullResistance(Pin pin,
PinPullResistance resistance) |
void |
setPwm(Pin pin,
int value) |
void |
setState(Pin pin,
PinState state) |
void |
setValue(Pin pin,
double value) |
void |
unexport(Pin pin) |
dispatchPinAnalogValueChangeEvent, dispatchPinDigitalStateChangeEvent, getPinCache, isShutdown, removeAllListeners, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isShutdown, removeAllListeners, shutdown
public static final String NAME
public RaspiGpioProvider()
public String getName()
getName
in interface GpioProvider
getName
in class GpioProviderBase
public boolean hasPin(Pin pin)
hasPin
in interface GpioProvider
hasPin
in class GpioProviderBase
public void export(Pin pin, PinMode mode)
export
in interface GpioProvider
export
in class GpioProviderBase
public void export(Pin pin, PinMode mode, PinState defaultState)
export
in interface GpioProvider
export
in class GpioProviderBase
public boolean isExported(Pin pin)
isExported
in interface GpioProvider
isExported
in class GpioProviderBase
public void unexport(Pin pin)
unexport
in interface GpioProvider
unexport
in class GpioProviderBase
public void setMode(Pin pin, PinMode mode)
setMode
in interface GpioProvider
setMode
in class GpioProviderBase
public PinMode getMode(Pin pin)
getMode
in interface GpioProvider
getMode
in class GpioProviderBase
public void setPullResistance(Pin pin, PinPullResistance resistance)
setPullResistance
in interface GpioProvider
setPullResistance
in class GpioProviderBase
public PinPullResistance getPullResistance(Pin pin)
getPullResistance
in interface GpioProvider
getPullResistance
in class GpioProviderBase
public void setState(Pin pin, PinState state)
setState
in interface GpioProvider
setState
in class GpioProviderBase
public PinState getState(Pin pin)
getState
in interface GpioProvider
getState
in class GpioProviderBase
public void setValue(Pin pin, double value)
setValue
in interface GpioProvider
setValue
in class GpioProviderBase
public double getValue(Pin pin)
getValue
in interface GpioProvider
getValue
in class GpioProviderBase
public void setPwm(Pin pin, int value)
setPwm
in interface GpioProvider
setPwm
in class GpioProviderBase
public int getPwm(Pin pin)
getPwm
in interface GpioProvider
getPwm
in class GpioProviderBase
public void pinStateChange(GpioInterruptEvent event)
pinStateChange
in interface GpioInterruptListener
public void addListener(Pin pin, PinListener listener)
addListener
in interface GpioProvider
addListener
in class GpioProviderBase
public void removeListener(Pin pin, PinListener listener)
removeListener
in interface GpioProvider
removeListener
in class GpioProviderBase
Copyright © 2012–2019 Pi4J. All rights reserved.