public class PinService extends java.lang.Object implements IPinService
IPinService| Modifier and Type | Method and Description |
|---|---|
Gpio.Value |
digitalRead(Gpio.Number pinNum)
Returns specified pin's value.
|
boolean |
digitalWrite(Gpio.Number pinNum,
Gpio.Value pinValue)
Sets value of specified gpio pin.
|
boolean |
exportPin(Gpio.Number pinNum)
Exports pin to user space.
|
Gpio.Mode |
getPinMode(Gpio.Number pinNum)
Returns pin mode.
|
static PinService |
getService(android.content.Context appContext,
Gpio.Model hardwareModel) |
boolean |
isPinExported(Gpio.Number pinNum)
Returns pin export status.
|
boolean |
isPinInput(Gpio.Number pinNum)
Returns gpio pin input state.
|
boolean |
isPinOutput(Gpio.Number pinNum)
Returns gpio pin output state.If pin is OUTPUT returns true.
|
boolean |
setPinMode(Gpio.Number pinNum,
Gpio.Mode pinMode)
Sets mode of specified gpio pin.
|
boolean |
unexportPin(Gpio.Number pinNum)
Unexports pin from user space.
|
public static PinService getService(android.content.Context appContext, Gpio.Model hardwareModel)
public Gpio.Value digitalRead(Gpio.Number pinNum)
IPinServicedigitalRead in interface IPinServicepublic boolean digitalWrite(Gpio.Number pinNum, Gpio.Value pinValue)
IPinServicedigitalWrite in interface IPinServicepublic boolean setPinMode(Gpio.Number pinNum, Gpio.Mode pinMode)
IPinServicesetPinMode in interface IPinServicepublic Gpio.Mode getPinMode(Gpio.Number pinNum)
IPinServicegetPinMode in interface IPinServicepublic boolean isPinOutput(Gpio.Number pinNum)
IPinServiceisPinOutput in interface IPinServicepublic boolean isPinInput(Gpio.Number pinNum)
IPinServiceisPinInput in interface IPinServicepublic boolean exportPin(Gpio.Number pinNum)
IPinServiceexportPin in interface IPinServicepublic boolean unexportPin(Gpio.Number pinNum)
IPinServiceunexportPin in interface IPinServicepublic boolean isPinExported(Gpio.Number pinNum)
IPinServiceisPinExported in interface IPinService