GpioCallback
public
abstract
class
GpioCallback
extends Object
java.lang.Object | |
↳ | com.google.android.things.pio.GpioCallback |
GPIO interrupt callback.
First call setEdgeTriggerType(int)
to set an interrupt edge to watch, then
registerGpioCallback(GpioCallback, Handler)
to start getting callbacks.
Summary
Public constructors | |
---|---|
GpioCallback()
|
Public methods | |
---|---|
boolean
|
onGpioEdge(Gpio gpio)
Called when an edge event triggers. |
void
|
onGpioError(Gpio gpio, int error)
Called when an error occurs with the interrupt event listener. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
GpioCallback
</div>
GpioCallback ()
</div>
Public methods
onGpioEdge
</div>
boolean onGpioEdge (Gpio gpio)
Called when an edge event triggers.
Parameters | |
---|---|
gpio |
Gpio :
The Gpio that received an edge event. |
Returns | |
---|---|
boolean |
True to keep watching for events, false to stop. |
</div>
onGpioError
</div>
void onGpioError (Gpio gpio, int error)
Called when an error occurs with the interrupt event listener.
At this point the receiver should assume that this Gpio is no longer usable. No further callbacks will be received on this object.</p>
Parameters | |
---|---|
gpio |
Gpio :
The Gpio that received an error. |
error |
int :
An OsConstants errno code.
|