
AN758
Rev. 0.1 13
5.3. Application Layer
The application layer for the USB CDC firmware example can be found in the VirtualSerial.c and Descriptors.c
files in the AN758_USB_CDC\src\VirtualSerial directory.
5.3.1. vcp_main
Virtual COM port entry function.
Syntax
void vcp_main(void)
Parameters
None
Return Value
None
Description
This function initialize USB stack and execute Echo mode or Bridge mode in endless while loop.
Example
enter_default_mode_from_reset();
vcp_main();
5.3.2. VCOM_echo
It echo input character to USB virtual COM
Syntax
void VCOM_echo(void)
Parameters
None
Return Value
None
Description
This function get byte from USB virtual COM port and send back to virtual COM. User will see echo character in
their serial com tool.
Example
VCOM_echo();
5.3.3. VCOM_bridge
It transfer data between USB virtual COM port and UART hardware COM port.
Syntax
void VCOM_bridge(void)
Parameters
None
Return Value
None
Description
This function acts as USB to UART bridge function.
Example
VCOM_bridge();
Comentários a estes Manuais