Microchip® Advanced Software Framework

oled1_event_groups_xpro_example/cdc.h File Reference

Embedded Debugger (EDBG) Virtual COM Port driver for FreeRTOS demo.

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

#include <board.h>
#include <usart_interrupt.h>

Functions

static void cdc_rx_init (struct usart_module *const usart, sercom_handler_t cdc_rx_handler)
 Initialize USART for reception from EDBG Virtual COM Port. More...
 

static void cdc_rx_init ( struct usart_module *const  usart,
sercom_handler_t  cdc_rx_handler 
)
inlinestatic

Initialize USART for reception from EDBG Virtual COM Port.

This function initializes the specified SERCOM USART driver instance for use with the Embedded Debugger (EDBG) Virtual COM Port. Both transmitter and receiver are enabled, but only the receive interrupt is enabled.

A custom handler function for the receive interrupt must must be supplied. See the SERCOM USART callback driver's handler for an implementation template: _usart_interrupt_handler().

Parameters
usartAddress of USART instance to use.
cdc_rx_handlerAddress of receive interrupt handler.

References _sercom_get_sercom_inst_index(), _sercom_set_handler(), usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, STATUS_OK, usart_enable(), usart_enable_transceiver(), usart_get_config_defaults(), usart_init(), USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.