public abstract class WiringPiGpioProviderBase extends GpioProviderBase implements GpioProvider, GpioInterruptListener
GpioProvider
implementation.Modifier and Type | Field and Description |
---|---|
protected static short |
MAX_PIN_CACHE |
protected static PinMode[] |
pinModeCache |
protected static short[] |
pinSupportedCache |
cache, DEFAULT_CACHE_SIZE, isshutdown, listeners
Constructor and Description |
---|
WiringPiGpioProviderBase() |
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) |
abstract String |
getName() |
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 |
setPwmRange(Pin pin,
int range) |
void |
setState(Pin pin,
PinState state) |
void |
setValue(Pin pin,
double value) |
void |
unexport(Pin pin) |
protected void |
updateInterruptListener(Pin pin) |
dispatchPinAnalogValueChangeEvent, dispatchPinDigitalStateChangeEvent, getPinCache, getPullResistance, isShutdown, removeAllListeners, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPullResistance, isShutdown, removeAllListeners, shutdown
protected static short MAX_PIN_CACHE
protected static short[] pinSupportedCache
protected static PinMode[] pinModeCache
public WiringPiGpioProviderBase()
public abstract 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 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 void setPwmRange(Pin pin, int range)
setPwmRange
in interface GpioProvider
setPwmRange
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
protected void updateInterruptListener(Pin pin)
Copyright © 2012–2019 Pi4J. All rights reserved.