Microchip® Advanced Software Framework

uart.c File Reference

Universal Asynchronous Receiver Transceiver (UART) driver for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "uart.h"

Functions

void uart_disable (Uart *p_uart)
 Disable UART receiver and transmitter. More...
 
void uart_disable_interrupt (Uart *p_uart, uint32_t ul_sources)
 Disable UART interrupts. More...
 
void uart_disable_rx (Uart *p_uart)
 Disable UART receiver. More...
 
void uart_disable_tx (Uart *p_uart)
 Disable UART transmitter. More...
 
void uart_enable (Uart *p_uart)
 Enable UART receiver and transmitter. More...
 
void uart_enable_interrupt (Uart *p_uart, uint32_t ul_sources)
 Enable UART interrupts. More...
 
void uart_enable_rx (Uart *p_uart)
 Enable UART receiver. More...
 
void uart_enable_tx (Uart *p_uart)
 Enable UART transmitter. More...
 
uint32_t uart_get_interrupt_mask (Uart *p_uart)
 Read UART interrupt mask. More...
 
Pdc * uart_get_pdc_base (Uart *p_uart)
 Get UART PDC base address. More...
 
uint32_t uart_get_status (Uart *p_uart)
 Get current status. More...
 
uint32_t uart_init (Uart *p_uart, const sam_uart_opt_t *p_uart_opt)
 Configure UART with the specified parameters. More...
 
uint32_t uart_is_rx_buf_end (Uart *p_uart)
 Check if one receive buffer is filled. More...
 
uint32_t uart_is_rx_buf_full (Uart *p_uart)
 Check if both receive buffers are full. More...
 
uint32_t uart_is_rx_ready (Uart *p_uart)
 Check if Received data is ready. More...
 
uint32_t uart_is_tx_buf_empty (Uart *p_uart)
 Check if both transmit buffers are sent out. More...
 
uint32_t uart_is_tx_buf_end (Uart *p_uart)
 Check if one transmit buffer is sent out. More...
 
uint32_t uart_is_tx_empty (Uart *p_uart)
 Check if Transmit Hold Register is empty. More...
 
uint32_t uart_is_tx_ready (Uart *p_uart)
 Check if Transmit is Ready. More...
 
uint32_t uart_read (Uart *p_uart, uint8_t *puc_data)
 Read from UART Receive Holding Register. More...
 
void uart_reset (Uart *p_uart)
 Reset UART receiver and transmitter. More...
 
void uart_reset_rx (Uart *p_uart)
 Reset UART receiver. More...
 
void uart_reset_status (Uart *p_uart)
 Reset status bits. More...
 
void uart_reset_tx (Uart *p_uart)
 Reset UART transmitter. More...
 
void uart_set_clock_divisor (Uart *p_uart, uint16_t us_divisor)
 Set UART clock divisor value. More...
 
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). More...