Definition in file uart.h.
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | CLR_UDRIE (UCSR0B &= ~(1<<UDRIE0)) |
#define | SET_UDRIE (UCSR0B |= (1<<UDRIE0)) |
#define | UART_RX_BUFFER_MASK ( UART_RX_BUFFER_SIZE - 1 ) |
#define | UART_RX_BUFFER_SIZE 32 |
#define | UART_TX_BUFFER_MASK ( UART_TX_BUFFER_SIZE - 1 ) |
#define | UART_TX_BUFFER_SIZE 64 |
Functions | |
void | InitUART (void) |
Init of uart. | |
void | uart_FlushRxBuffer (void) |
Empties the uart RX buffer. | |
__interrupt void | UART_RX_interrupt (void) |
RX interrupt handler. | |
void | uart_SendByte (unsigned char data) |
send a byte. | |
void | uart_SendInt (int Tall) |
Sends a integer. | |
void | uart_SendString (unsigned char Tab[]) |
Sends a string. | |
__interrupt void | UART_TX_interrupt (void) |
TX interrupt handler. | |
Variables | |
unsigned char | UART_RxBuffer [UART_RX_BUFFER_SIZE] |
Buffer with received string from uart. |
|
Definition at line 37 of file uart.h. Referenced by UART_TX_interrupt(). |
|
Definition at line 36 of file uart.h. Referenced by uart_SendByte(). |
|
|
|
Definition at line 24 of file uart.h. Referenced by UART_RX_interrupt(). |
|
Definition at line 31 of file uart.h. Referenced by uart_SendByte(), and UART_TX_interrupt(). |
|
|
|
Init of uart. Setup uart. The BAUD value must be modified according to clock frqequency. Refer to datasheet for details. Definition at line 45 of file uart.c. References BAUD, and UART_RxPtr. Referenced by Init().
|
|
Empties the uart RX buffer. Empties the uart RX buffer.
Definition at line 135 of file uart.c. References UART_RxBuffer, and UART_RxPtr. Referenced by main().
|
|
RX interrupt handler. RX interrupt handler. RX interrupt always enabled. Definition at line 146 of file uart.c. References GLOBAL_FLAGS::cmd, FALSE, GLOBAL_FLAGS::running, status, TRUE, UART_RX_BUFFER_SIZE, UART_RxBuffer, UART_RxPtr, and uart_SendByte().
Here is the call graph for this function: ![]() |
|
send a byte. Puts a byte in TX buffer and starts uart TX interrupt. If TX buffer is full it will hang until space.
Definition at line 73 of file uart.c. References SET_UDRIE, and UART_TX_BUFFER_MASK. Referenced by ShowHelp(), UART_RX_interrupt(), uart_SendInt(), and uart_SendString().
|
|
Sends a integer. Converts a integer to ASCII and sends it using uart_SendByte. If TX buffer is full it will hang until space.
Definition at line 111 of file uart.c. References uart_SendByte(). Referenced by ShowData().
Here is the call graph for this function: ![]() |
|
Sends a string. Loops thru a string and send each byte with uart_SendByte. If TX buffer is full it will hang until space.
Definition at line 97 of file uart.c. References uart_SendByte(). Referenced by main(), and ShowData().
Here is the call graph for this function: ![]() |
|
TX interrupt handler. TX interrupt handler. TX interrupt turned on by uart_SendByte, turned off when TX buffer is empty. Definition at line 200 of file uart.c. References CLR_UDRIE, and UART_TX_BUFFER_MASK.
|
|
Buffer with received string from uart.
Definition at line 46 of file uart.h. Referenced by main(), uart_FlushRxBuffer(), and UART_RX_interrupt(). |