USB CDC: Virtual COM

Overview

Usage

 USBIOClkConfig(): enabled the clock for USB machine.

 CDC_Init(): initialization of CDC class

USB_Init(): initialization USB pins.

): control of USB_CONNECT pin. Param: TRUE or FALSE.

USB_Connect(bool

 

CDC_OutBufAvailChar (&int): total of byte that arrive.

 

CDC_RdOutBuf (&serBuf[0], &numBytesToRead): whre serBuf is a array of char and numBytesToRead is an int for the read byte. This fuction return the number of byte to be read.

unsigned char *)&serBuf[0], numBytesRead): write on the Virtual COM the char array

 

 

USB_WriteEP (CDC_DEP_IN, (