|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SerialConsole
A serial console can be used to send and receive characters. Only one character may be sent at a time, and only one character may be received at a time.
Method Summary | |
---|---|
int |
readByte()
Return the next unsigned byte received (in the range 0 through 255). |
void |
setInterruptHandlers(Runnable receiveInterruptHandler,
Runnable sendInterruptHandler)
Set this console's receive and send interrupt handlers. |
void |
writeByte(int value)
Send another byte. |
Method Detail |
---|
void setInterruptHandlers(Runnable receiveInterruptHandler, Runnable sendInterruptHandler)
The receive interrupt handler is called every time another byte arrives and can be read using readByte().
The send interrupt handler is called every time a byte sent with writeByte() is finished being sent. This means that another byte can be sent.
receiveInterruptHandler
- the callback to call when a byte
arrives.sendInterruptHandler
- the callback to call when another byte
can be sent.int readByte()
void writeByte(int value)
value
- the byte to be sent (the upper 24 bits are ignored).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |