UART functions.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
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... | |
void uart_close | ( | void | ) |
Closes communication line.
References USART_BASE, USART_DISABLE, and usart_disable_interrupt().
void uart_config | ( | usb_cdc_line_coding_t * | cfg | ) |
Configures communication line.
cfg | pointer on line configuration descriptor |
References sam_usart_opt_t::baudrate, usb_cdc_line_coding_t::bCharFormat, usb_cdc_line_coding_t::bDataBits, usb_cdc_line_coding_t::bParityType, CDC_PAR_EVEN, CDC_PAR_MARK, CDC_PAR_NONE, CDC_PAR_ODD, CDC_PAR_SPACE, CDC_STOP_BITS_1, CDC_STOP_BITS_1_5, CDC_STOP_BITS_2, sam_usart_opt_t::channel_mode, sam_usart_opt_t::char_length, usb_cdc_line_coding_t::dwDTERate, LE32_TO_CPU, sam_usart_opt_t::parity_type, sam_usart_opt_t::stop_bits, sysclk_get_peripheral_bus_hz(), USART_BASE, usart_disable_interrupt(), usart_enable_interrupt(), usart_enable_rx(), usart_enable_tx(), usart_get_interrupt_mask(), and usart_init_rs232().
Referenced by ui_usb_enum_event().
void uart_open | ( | void | ) |
Opens communication line.
References sysclk_get_peripheral_bus_hz(), USART_BASE, USART_ENABLE, usart_enable_interrupt(), usart_enable_rx(), usart_enable_tx(), usart_init_rs232(), USART_INT_IRQn, USART_INT_LEVEL, and USART_PERIPH_CLK_ENABLE.
Referenced by ui_usb_enum_event().
void uart_rx_notify | ( | void | ) |
Callback called by CDC interface when the CDC device has received data.
References USART_BASE, usart_enable_interrupt(), usart_enable_tx(), and usart_get_interrupt_mask().