X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fcommon%2Fvirtual_com.c;h=9b40b50d721c18d18b1880ca8b0706ffdf12acf7;hb=c37308066d9b558af6878984612007f695776780;hp=370767898a4c275b16c8ad9f57fd701a37e3f39f;hpb=ae08cb7946610699238315e78bb739380001ec23;p=gps-watch.git diff --git a/src/common/virtual_com.c b/src/common/virtual_com.c index 3707678..9b40b50 100644 --- a/src/common/virtual_com.c +++ b/src/common/virtual_com.c @@ -660,25 +660,17 @@ USB_VcomInit (uint16_t vid, uint16_t pid) } /* 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; -#if defined(USB_DEVICE_CONFIG_EHCI) && (USB_DEVICE_CONFIG_EHCI > 0) - USB_EhciPhyDeinit(CONTROLLER_ID); -#endif -#if defined(USB_DEVICE_CONFIG_KHCI) && (USB_DEVICE_CONFIG_KHCI > 0) - CLOCK_DisableUsbfs0Clock(); -#endif -#if defined(USB_DEVICE_CONFIG_LPCIP3511FS) && (USB_DEVICE_CONFIG_LPCIP3511FS > 0U) - /* enable USB IP clock, user code. */ - CLOCK_DisableClock(kCLOCK_Usbd0); -#endif /* USB_DEVICE_CONFIG_LPCIP3511FS */ - -#if defined(USB_DEVICE_CONFIG_LPCIP3511HS) && (USB_DEVICE_CONFIG_LPCIP3511HS > 0U) -/* enable USB IP clock,user code. */ -#endif /* USB_DEVICE_CONFIG_LPCIP3511HS */ + + /* XXX: We are not stopping the USBOTG clock yet. */ } void