Hardware UART
[Architecture and hardware specific services]


Detailed Description

Functions for sending and receiving data via UART.

Note:
Currently, the UART is set to a fixed speed of 115200 Baud.


Files

file  uart.c
 UART implementation (license: GPLv2).
file  uart.h
 UART header (license: GPLv2).

Functions

void uart_init ()
 Initializes the UART.
void uart_connect_stdio ()
 Connects the UART with the I/O functions of the C Standard Library.
void uart_putc (uint8_t c)
 Transmits a single character/byte via the UART.
void uart_putc_hex (uint8_t b)
 Transmits a byte in hexadecimal ASCII representation via the UART.
uint8_t uart_getc ()
 Receives a byte from the UART.
uint8_t uart_getc_try ()
 Receives a byte from the UART without blocking.


Function Documentation

void uart_putc ( uint8_t  c  ) 

Transmits a single character/byte via the UART.

Parameters:
[in] c The byte to send.

void uart_putc_hex ( uint8_t  b  ) 

Transmits a byte in hexadecimal ASCII representation via the UART.

Parameters:
[in] b The byte to transmit.

uint8_t uart_getc (  ) 

Receives a byte from the UART.

Returns:
The byte received.

uint8_t uart_getc_try (  ) 

Receives a byte from the UART without blocking.

Returns:
The byte received if available, 0 otherwise.


Generated on Thu May 22 18:12:37 2008 for mega-eth by  doxygen 1.5.5