Microchip® Advanced Software Framework

cdc/host/example/uart_sam.c File Reference

UART functions.

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

#include "conf_example.h"
#include "conf_usb_host.h"
#include <asf.h>

Macros

#define USART_PERIPH_CLK_ENABLE()   sysclk_enable_peripheral_clock(USART_ID)
 

Functions

 ISR (USART_HANDLER)
 
void uart_close (void)
 Closes communication line. More...
 
void uart_config (usb_cdc_line_coding_t *cfg)
 Configures communication line. More...
 
void uart_open (void)
 Opens communication line. More...
 
void uart_rx_notify (void)
 Callback called by CDC interface when the CDC device has received data. More...
 

Variables

static sam_usart_opt_t usart_options
 

#define USART_PERIPH_CLK_ENABLE ( )    sysclk_enable_peripheral_clock(USART_ID)

Referenced by uart_open().

void uart_close ( void  )

Closes communication line.

References usart_disable_interrupt().

Referenced by main_cdc_disable().

void uart_rx_notify ( void  )

Callback called by CDC interface when the CDC device has received data.

References usart_enable_interrupt(), usart_enable_tx(), and usart_get_interrupt_mask().

sam_usart_opt_t usart_options
static
Initial value:
= {
.baudrate = 115200,
.char_length = US_MR_CHRL_8_BIT,
.parity_type = US_MR_PAR_NO,
.stop_bits = US_MR_NBSTOP_1_BIT,
.channel_mode = US_MR_CHMODE_NORMAL,
}