Apps     Components     Interfaces     All Files     Source Tree     source: tos.interfaces.HPLUART.nc

Interface: HPLUART

The byte-level interface to the UART, which can send and receive simultaneously.

This interface, as it directly abstracts hardware, follows the hardware interface convention of not maintaining state. Therefore, some conditions that could be understood by a higher layer to be errors execute properly; for example, one can call txBit when in receive mode. A higher level interface must provide the checks for conditions such as this.

Components providing this interface:
tos.platform.avrmote.HPLUARTC
tos.platform.avrmote.HPLUARTM

Components requiring this interface:
tos.system.UARTM

Commands

Events

Commands - Details

init

result_t init(void)

Initialize the UART.
Returns: SUCCESS always.

put

result_t put(uint8_t data)

Send one byte of data. There should only one outstanding send at any time; one must wait for the putDone event before calling put again.
Returns: SUCCESS always.

Events - Details

get

result_t get(uint8_t data)

A byte of data has been received.
Returns: SUCCESS always.

putDone

result_t putDone(void)

The previous call to put has completed; another byte may now be sent.
Returns: SUCCESS always.