UART functions.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
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... | |
void uart_close | ( | uint8_t | port | ) |
Closes communication line.
References UNUSED, usart_disable(), and usart_module_edbg.
Referenced by main_cdc_disable().
void uart_config | ( | uint8_t | port, |
usb_cdc_line_coding_t * | cfg | ||
) |
Configures communication line.
cfg | line configuration |
References usart_config::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_config::character_size, usb_cdc_line_coding_t::dwDTERate, GCLK_GENERATOR_3, usart_config::generator_source, LE32_TO_CPU, usart_config::mux_setting, usart_config::parity, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, rx_data, usart_config::stopbits, UNUSED, USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_BUFFER_TRANSMITTED, USART_CHARACTER_SIZE_5BIT, USART_CHARACTER_SIZE_6BIT, USART_CHARACTER_SIZE_7BIT, USART_CHARACTER_SIZE_8BIT, usart_conf, usart_disable(), usart_enable(), usart_enable_callback(), usart_get_config_defaults(), usart_init(), usart_module_edbg, USART_PARITY_EVEN, USART_PARITY_NONE, USART_PARITY_ODD, usart_read_buffer_job(), usart_register_callback(), usart_rx_callback(), USART_STOPBITS_1, USART_STOPBITS_2, and usart_tx_callback().
void uart_open | ( | uint8_t | port | ) |
Opens communication line.
References UNUSED, usart_enable(), and usart_module_edbg.
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 tx_callback_flag, tx_data, udi_cdc_getc(), ui_com_rx_start(), UNUSED, USART_CALLBACK_BUFFER_TRANSMITTED, usart_enable_callback(), usart_module_edbg, and usart_write_buffer_job().