Interface: tos.interfaces.ByteComm
interface ByteComm
A byte-level communication interface. It signals byte receptions and
provides a split-phased byte send interface. txByteReady states
that the component can accept another byte in its queue to send,
while txDone states that the send queue has been emptied.
- Author:
-
Jason Hill
-
David Gay
-
Philip Levis
Commands
command result_t txByte(uint8_t data)
Events
event result_t rxByteReady(uint8_t data, bool error, uint16_t strength)
event result_t txByteReady(bool success)
event result_t txDone()
Commands - Details
txByte
command result_t txByte(uint8_t data)
- Parameters:
-
data
- the byte to be transmitted
- Returns:
-
SUCCESS if successful
Events - Details
rxByteReady
event result_t rxByteReady(uint8_t data, bool error, uint16_t strength)
- Parameters:
-
data
- the byte read from the radio
-
error
- determines the success of receiving the byte
-
strength
- the signal strength of the received byte
- Returns:
-
SUCCESS if successful
txByteReady
event result_t txByteReady(bool success)
- Parameters:
-
success
- Notification of the successful transmission of the last byte
- Returns:
-
SUCCESS if successful
txDone
event result_t txDone()
- Returns:
-
SUCCESS always