552 Pdc * uart_get_pdc_base(Uart *p_uart)
Get UART PDC base address.
void uart_reset_rx(Uart *p_uart)
Reset UART receiver.
#define UART_CMPR_VAL1(value)
#define UART_CMPR_CMPPAR
(UART_CMPR) Compare Parity
#define UART_WPMR_WPEN
(UART_WPMR) Write Protection Enable
void uart_disable_tx(Uart *p_uart)
Disable UART transmitter.
#define UART_SR_TXEMPTY
(UART_SR) Transmitter Empty
__IO uint32_t UART_CMPR
(Uart Offset: 0x0024) Comparison Register
#define UART_CR_RSTTX
(UART_CR) Reset Transmitter
__IO uint32_t UART_MR
(Uart Offset: 0x0004) Mode Register
uint32_t uart_is_tx_empty(Uart *p_uart)
Check if Transmit Hold Register is empty. Check if the last data written in UART_THR has been loaded ...
Universal Asynchronous Receiver Transceiver (UART) driver for SAM.
void uart_set_clock_divisor(Uart *p_uart, uint16_t us_divisor)
Set UART clock divisor value.
uint32_t uart_is_tx_buf_end(Uart *p_uart)
Check if one transmit buffer is sent out.
uint32_t uart_read(Uart *p_uart, uint8_t *puc_data)
Read from UART Receive Holding Register. Before reading user should check if rx is ready...
#define UART_WPMR_WPKEY_PASSWD
(UART_WPMR) Writing any other value in this field aborts the write operation.Always reads as 0...
__O uint32_t UART_THR
(Uart Offset: 0x001C) Transmit Holding Register
uint32_t uart_is_tx_buf_empty(Uart *p_uart)
Check if both transmit buffers are sent out.
#define UART1
(UART1 ) Base Address
void uart_disable(Uart *p_uart)
Disable UART receiver and transmitter.
void uart_enable(Uart *p_uart)
Enable UART receiver and transmitter.
uint32_t uart_init(Uart *p_uart, const sam_uart_opt_t *p_uart_opt)
Configure UART with the specified parameters.
__O uint32_t UART_IDR
(Uart Offset: 0x000C) Interrupt Disable Register
#define UART_CR_RXEN
(UART_CR) Receiver Enable
__O uint32_t UART_CR
(Uart Offset: 0x0000) Control Register
#define UART_SR_RXRDY
(UART_SR) Receiver Ready
void uart_enable_rx(Uart *p_uart)
Enable UART receiver.
__IO uint32_t UART_BRGR
(Uart Offset: 0x0020) Baud Rate Generator Register
#define UART_MR_FILTER
(UART_MR) Receiver Digital Filter
void uart_disable_rx(Uart *p_uart)
Disable UART receiver.
void uart_disable_interrupt(Uart *p_uart, uint32_t ul_sources)
Disable UART interrupts.
__I uint32_t UART_RHR
(Uart Offset: 0x0018) Receive Holding Register
uint32_t uart_get_interrupt_mask(Uart *p_uart)
Read UART interrupt mask.
#define UART_CMPR_CMPMODE_START_CONDITION
(UART_CMPR) Comparison condition must be met to start reception.
uint32_t uart_is_rx_buf_end(Uart *p_uart)
Check if one receive buffer is filled.
#define UART_SR_TXRDY
(UART_SR) Transmitter Ready
uint32_t uart_is_rx_ready(Uart *p_uart)
Check if Received data is ready. Check if data has been received and loaded in UART_RHR.
#define UART_CR_TXEN
(UART_CR) Transmitter Enable
Option list for UART peripheral initialization.
void uart_reset_status(Uart *p_uart)
Reset status bits.
#define UART_CR_RSTSTA
(UART_CR) Reset Status
#define UART_CR_RXDIS
(UART_CR) Receiver Disable
uint32_t uart_get_status(Uart *p_uart)
Get current status.
#define UART_CMPR_VAL2(value)
#define UART_MCK_DIV_MAX_FACTOR
#define UART_CR_TXDIS
(UART_CR) Transmitter Disable
#define UART_CR_RSTRX
(UART_CR) Reset Receiver
__I uint32_t UART_IMR
(Uart Offset: 0x0010) Interrupt Mask Register
uint32_t uart_write(Uart *p_uart, const uint8_t uc_data)
Write to UART Transmit Holding Register Before writing user should check if tx is ready (or empty)...
uint32_t uart_is_rx_buf_full(Uart *p_uart)
Check if both receive buffers are full.
void uart_reset_tx(Uart *p_uart)
Reset UART transmitter.
void uart_enable_tx(Uart *p_uart)
Enable UART transmitter.
__I uint32_t UART_SR
(Uart Offset: 0x0014) Status Register
#define UART0
(UART0 ) Base Address
__IO uint32_t UART_WPMR
(Uart Offset: 0x00E4) Write Protection Mode Register
uint32_t uart_is_tx_ready(Uart *p_uart)
Check if Transmit is Ready. Check if data has been loaded in UART_THR and is waiting to be loaded in ...
#define Assert(expr)
This macro is used to test fatal errors.
__O uint32_t UART_IER
(Uart Offset: 0x0008) Interrupt Enable Register
void uart_reset(Uart *p_uart)
Reset UART receiver and transmitter.
#define UART2
(UART2 ) Base Address
void uart_enable_interrupt(Uart *p_uart, uint32_t ul_sources)
Enable UART interrupts.