UART functions.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
ISR (usart_interrupt, USART_IRQ_GROUP, 3) | |
void | uart_close (uint8_t port) |
Closes communication line. More... | |
void | uart_config (uint8_t port, usb_cdc_line_coding_t *cfg) |
Configures communication line. More... | |
void | uart_open (uint8_t port) |
Opens communication line. More... | |
void | uart_rx_notify (uint8_t port) |
Called by CDC interface Callback running when CDC device have received data. More... | |
Variables | |
static usart_options_t | usart_options |
ISR | ( | usart_interrupt | , |
USART_IRQ_GROUP | , | ||
3 | |||
) |
References udi_cdc_getc(), udi_cdc_is_rx_ready(), udi_cdc_is_tx_ready(), udi_cdc_putc(), udi_cdc_signal_framing_error(), udi_cdc_signal_overrun(), ui_com_error(), ui_com_overflow(), ui_com_rx_start(), ui_com_rx_stop(), ui_com_tx_start(), ui_com_tx_stop(), USART, usart_read_char(), usart_reset_status(), USART_SUCCESS, and usart_write_char().
void uart_close | ( | uint8_t | port | ) |
void uart_config | ( | uint8_t | port, |
usb_cdc_line_coding_t * | cfg | ||
) |
Configures communication line.
cfg | line configuration |
References usart_options_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, usart_options_t::channelmode, usart_options_t::charlength, usb_cdc_line_coding_t::dwDTERate, LE32_TO_CPU, usart_options_t::paritytype, usart_options_t::stopbits, sysclk_get_pba_hz(), USART, USART_1_5_STOPBITS, USART_1_STOPBIT, USART_2_STOPBITS, USART_EVEN_PARITY, usart_init_rs232(), USART_MARK_PARITY, USART_NO_PARITY, USART_NORMAL_CHMODE, USART_ODD_PARITY, and USART_SPACE_PARITY.
void uart_open | ( | uint8_t | port | ) |
Opens communication line.
References irq_register_handler, sysclk_enable_pba_module(), sysclk_get_pba_hz(), USART, usart_init_rs232(), USART_IRQ, USART_SUCCESS, and USART_SYSCLK.
Referenced by main_cdc_enable().
void uart_rx_notify | ( | uint8_t | port | ) |
Called by CDC interface Callback running when CDC device have received data.
References USART.
|
static |