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)
IPinService
digitalRead
in interface IPinService
public boolean digitalWrite(Gpio.Number pinNum, Gpio.Value pinValue)
IPinService
digitalWrite
in interface IPinService
public boolean setPinMode(Gpio.Number pinNum, Gpio.Mode pinMode)
IPinService
setPinMode
in interface IPinService
public Gpio.Mode getPinMode(Gpio.Number pinNum)
IPinService
getPinMode
in interface IPinService
public boolean isPinOutput(Gpio.Number pinNum)
IPinService
isPinOutput
in interface IPinService
public boolean isPinInput(Gpio.Number pinNum)
IPinService
isPinInput
in interface IPinService
public boolean exportPin(Gpio.Number pinNum)
IPinService
exportPin
in interface IPinService
public boolean unexportPin(Gpio.Number pinNum)
IPinService
unexportPin
in interface IPinService
public boolean isPinExported(Gpio.Number pinNum)
IPinService
isPinExported
in interface IPinService