UartDeviceCallback
public
abstract
class
UartDeviceCallback
extends Object
java.lang.Object | |
↳ | com.google.android.things.pio.UartDeviceCallback |
UART interrupt callback.
Call registerUartDeviceCallback(UartDeviceCallback, Handler)
to start getting
callbacks.
Summary
Public constructors | |
---|---|
UartDeviceCallback()
|
Public methods | |
---|---|
boolean
|
onUartDeviceDataAvailable(UartDevice uart)
Called when data is ready to be read from the UART. |
void
|
onUartDeviceError(UartDevice uart, int error)
Called when an error occurs with the interrupt event listener. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
UartDeviceCallback
</div>
UartDeviceCallback ()
</div>
Public methods
onUartDeviceDataAvailable
</div>
boolean onUartDeviceDataAvailable (UartDevice uart)
Called when data is ready to be read from the UART.
Parameters | |
---|---|
uart |
UartDevice :
The UartDevice that has data ready. |
Returns | |
---|---|
boolean |
True to keep watching for events, false to stop. |
</div>
onUartDeviceError
</div>
void onUartDeviceError (UartDevice uart, int error)
Called when an error occurs with the interrupt event listener.
At this point the receiver should assume that this UART is no longer usable. No further callbacks will be received on this object.</p>
Parameters | |
---|---|
uart |
UartDevice :
The UartDevice that received an error. |
error |
int :
An OsConstants errno code.
|
</div>