This program is a simple demonstration of how the Virtual Comport can be
used to send and receive data from the PC. It does not us CircleOS, just
some of the components. It is a combination of the MODBUS and VirtualComPort
programs found in the Project area of www.stm32circle.com
A simple Serial Port terminal program is also include that allows you to interface
with the EVO. You can use Hyperteminal and the letters 'u', 'd', 'l', 'r' and 's'
to change LCD display.
The functions you will be dealing with are the USB_SIL_READ and USB_SIL_WRITE.
These manage most of the USB leg work. Once you know what endpoints are being
used for what, ie.
EP1_IN would be for data going from the STM32 to the PC
EP3_OUT would be used for reading data from the PC through the USB
// USB_SIL_READ function gets data from the USB that was sent to
// the EP3_OUT endpoint from the PC and is then put in the msg_buf1
// USB_SIL_WRITE function stores data in msg_buf1 along with the number
// number of data bytes to be sent to the PC. In this case only byte
// that was just received is echoed back to hyperterminal
// SetEPTxValid function sets the EP_TX_VALID allowing for the data
// and size to be sent to the PC using USB endpoint ENDP1