projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bootloader: Stop USB serial device before entering the application.
[gps-watch.git]
/
src
/
common
/
virtual_com.c
diff --git
a/src/common/virtual_com.c
b/src/common/virtual_com.c
index aa25cd78590424c7d567414888c855fd3aa9d2c4..9b40b50d721c18d18b1880ca8b0706ffdf12acf7 100644
(file)
--- a/
src/common/virtual_com.c
+++ b/
src/common/virtual_com.c
@@
-660,10
+660,14
@@
USB_VcomInit (uint16_t vid, uint16_t pid)
}
/* See virtual_com.h for documentation of this function. */
}
/* See virtual_com.h for documentation of this function. */
-void USB_VcomDeinit(usb_device_handle deviceHandle)
+void
+USB_VcomDeinit (void)
{
{
- USB_DeviceStop(deviceHandle);
- USB_DeviceDeinit(deviceHandle);
+ if (s_cdcVcom.deviceHandle == NULL)
+ return;
+
+ USB_DeviceStop (s_cdcVcom.deviceHandle);
+ USB_DeviceDeinit (s_cdcVcom.deviceHandle);
s_cdcVcom.deviceHandle = NULL;
/* XXX: We are not stopping the USBOTG clock yet. */
s_cdcVcom.deviceHandle = NULL;
/* XXX: We are not stopping the USBOTG clock yet. */