Hi
Is it normal for a program that are using usb serial to stop running If the usb is not plugged in or should the program continue to run
USB Serial
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: USB Serial
Hello,
The USB Init routine will by default wait forever for a USB enumeration, that is the PC request for info and the device is setup correctly with device drivers.
If you go into the USB component properties then you can enable a timeout which will allow the init function to wait for a bit and then resume your program. The return value from the init routine then tells you if the USB is active or not.
The USB Init routine will by default wait forever for a USB enumeration, that is the PC request for info and the device is setup correctly with device drivers.
If you go into the USB component properties then you can enable a timeout which will allow the init function to wait for a bit and then resume your program. The return value from the init routine then tells you if the USB is active or not.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel