XMEGA UART definitions. More...
#include <assert.h>#include <types.h>#include <chip/uart.h>#include <regs/xmega_usart.h>Go to the source code of this file.
Defines | |
UART enable/disable flags | |
| #define | UART_FLAG_TX (1 << 0) |
| Enable/disable transmitter. | |
| #define | UART_FLAG_RX (1 << 1) |
| Enable/disable receiver. | |
Transmitting Data | |
| #define | uart_transmit_is_complete(uart_id) uart_transmit_is_complete_priv(uart_t uart) |
| Tests if all data has been transmitted. | |
| #define | uart_tx_buffer_is_empty(uart_id) uart_tx_buffer_is_empty_priv(uart_get_regs(uart_id)) |
| Test if tx buffer is empty. | |
| #define | uart_send_byte(uart_id, data) uart_send_byte_priv(uart_get_regs(uart_id), data) |
| Send data without checking if the pipline is empty. | |
| #define | uart_put_byte(uart_id, data) uart_put_byte_priv(uart_get_regs(uart_id), data) |
| Sends data if room is left in the tx pipeline. | |
Receiving Data | |
| #define | uart_rx_buffer_is_full(uart_id) uart_rx_buffer_is_full_priv(uart_get_regs(uart_id)) |
| Test if rx buffer is full. | |
| #define | uart_get_byte(uart_id, data) uart_get_byte_priv(uart_get_regs(uart_id), data) |
| Reads data if data is available in the rx buffer. | |
Initialization | |
| #define | uart_enable(uart_id, flags) |
| Enable UART transmitter and/or receiver. | |
Functions | |
| void | uart_init_priv (uart_t uart, uart_flags_t flags) |
| Initializes the UART. | |
| static bool | uart_transmit_is_complete_priv (uart_t uart) |
| Tests if all data has been transmitted. | |
| static bool | uart_tx_buffer_is_empty_priv (uart_t uart) |
| Test if tx buffer is empty. | |
| static bool | uart_rx_buffer_is_full_priv (uart_t uart) |
| Test if rx buffer is full. | |
| static void | uart_send_byte_priv (uart_t uart, uint8_t data) |
| Send data without checking if the pipline is empty. | |
| static bool | uart_put_byte_priv (uart_t uart, uint8_t data) |
| Send data if transmitter pipeline is empty. | |
| static bool | uart_get_byte_priv (uart_t uart, uint8_t *data) |
| Read data if data is available. | |
XMEGA UART definitions.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file uart_xmega.h.
1.6.3