Interface: tos.interfaces.UartByte

interface UartByte

Author:
Jonathan Hui <jhui@archedrock.com>
Version:
$Revision: 1.5 $ $Date: 2008/06/04 03:00:35 $

Commands
command error_t receive(uint8_t *byte, uint8_t timeout) Receive a single uart byte.
command error_t send(uint8_t byte) Send a single uart byte.

Commands - Details

receive

command error_t receive(uint8_t *byte, uint8_t timeout)

Receive a single uart byte. The call blocks until a byte is received.

Parameters:
'uint8_t* ONE byte' Where to place received byte.
timeout - How long in byte times to wait.
Returns:
SUCCESS if a byte was received, FAIL if timed out.

send

command error_t send(uint8_t byte)

Send a single uart byte. The call blocks until it is ready to accept another byte for sending.

Parameters:
byte - The byte to send.
Returns:
SUCCESS if byte was sent, FAIL otherwise.