stm32/usb: Fully deinitialise USB periph when it is deactivated.

This commit is contained in:
Damien George 2018-11-28 12:06:47 +11:00
parent 5f67b03e99
commit 3a723ad2fe
1 changed files with 1 additions and 0 deletions

View File

@ -166,6 +166,7 @@ void pyb_usb_dev_deinit(void) {
usb_device_t *usb_dev = &usb_device;
if (usb_dev->enabled) {
USBD_Stop(&usb_dev->hUSBDDevice);
USBD_DeInit(&usb_dev->hUSBDDevice);
usb_dev->enabled = false;
}
}