public class OdroidGpioProvider extends WiringPiGpioProviderBase implements GpioProvider, GpioInterruptListener, AnalogInputListener
GpioProvider implementation.| Modifier and Type | Field and Description |
|---|---|
static int |
AIN_ADDRESS_OFFSET |
protected static double |
analogInputListenerChangeThreshold |
protected static int |
analogInputPollingRate |
static double |
DEFAULT_ANALOG_INPUT_LISTENER_CHANGE_THRESHOLD |
static int |
DEFAULT_ANALOG_INPUT_POLLING_RATE |
static String |
NAME |
MAX_PIN_CACHE, pinModeCache, pinSupportedCachecache, DEFAULT_CACHE_SIZE, isshutdown, listeners| Constructor and Description |
|---|
OdroidGpioProvider()
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
export(Pin pin,
PinMode mode,
PinState defaultState) |
static double |
getAnalogInputListenerChangeThreshold()
Get the analog input listener change value threshold.
|
static int |
getAnalogInputPollingRate()
Get the analog input monitor polling rate in milliseconds.
|
String |
getName() |
double |
getValue(Pin pin) |
boolean |
isExported(Pin pin) |
void |
pinValueChange(AnalogInputEvent event) |
static void |
setAnalogInputListenerChangeThreshold(double threshold)
Set the analog input listener change value threshold.
|
static void |
setAnalogInputPollingRate(int milliseconds)
Set the analog input monitor polling rate in milliseconds.
|
void |
setMode(Pin pin,
PinMode mode) |
void |
unexport(Pin pin) |
protected void |
updateInterruptListener(Pin pin) |
addListener, export, getMode, getPwm, getState, hasPin, pinStateChange, removeListener, setPullResistance, setPwm, setPwmRange, setState, setValuedispatchPinAnalogValueChangeEvent, dispatchPinDigitalStateChangeEvent, getPinCache, getPullResistance, isShutdown, removeAllListeners, shutdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, export, getMode, getPullResistance, getPwm, getState, hasPin, isShutdown, removeAllListeners, removeListener, setPullResistance, setPwm, setPwmRange, setState, setValue, shutdownpinStateChangepublic static final String NAME
public static final int AIN_ADDRESS_OFFSET
public static final int DEFAULT_ANALOG_INPUT_POLLING_RATE
public static final double DEFAULT_ANALOG_INPUT_LISTENER_CHANGE_THRESHOLD
protected static int analogInputPollingRate
protected static double analogInputListenerChangeThreshold
public OdroidGpioProvider()
public static int getAnalogInputPollingRate()
public static double getAnalogInputListenerChangeThreshold()
public static void setAnalogInputPollingRate(int milliseconds)
milliseconds - polling rate in milliseconds; this value must be a positive number
else a default polling rate is usedpublic static void setAnalogInputListenerChangeThreshold(double threshold)
threshold - change threshold value; this value must be zero or greater. If the threshold value is set
to zero, then any change in value will dispatch a new analog input value event.public String getName()
getName in interface GpioProvidergetName in class WiringPiGpioProviderBasepublic void export(Pin pin, PinMode mode, PinState defaultState)
export in interface GpioProviderexport in class WiringPiGpioProviderBasepublic boolean isExported(Pin pin)
isExported in interface GpioProviderisExported in class WiringPiGpioProviderBasepublic void unexport(Pin pin)
unexport in interface GpioProviderunexport in class WiringPiGpioProviderBasepublic void setMode(Pin pin, PinMode mode)
setMode in interface GpioProvidersetMode in class WiringPiGpioProviderBasepublic double getValue(Pin pin)
getValue in interface GpioProvidergetValue in class WiringPiGpioProviderBasepublic void pinValueChange(AnalogInputEvent event)
pinValueChange in interface AnalogInputListenerprotected void updateInterruptListener(Pin pin)
updateInterruptListener in class WiringPiGpioProviderBaseCopyright © 2012–2019 Pi4J. All rights reserved.