USBFS_UART how to detect opening of USB Comm-port ? | Cypress Semiconductor
USBFS_UART how to detect opening of USB Comm-port ?
Is there a way to detect the opening/closing of the (virtual) comm-port from the PC side ?
I tried several USB variables but cannot figur out which one is the correct one to use, mainly because the reaction of the variables depend on which PC program I use.
For example, using TeraTerm give a configuration change on which I could trigger.
But unfortunately using Bray's Terminal or the following CSharp program does not (always) give a configuration change.
SerialPort Dut=new SerialPort("COM7",115200);
Attached i have the basic USBFS_UART example, I made some changes to run it on my hardware (CY8CKIT-059) but, as said, it only registers changes in settings; not in opening/closing of the USB port.
- In my end-application I have a commandline-interface in which you can start/stop several timers and readout analog values. I want to reset the timers and maybe other stuff as soon as the USB port is closed.