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 | ) |
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.