stm32/usb: Fully deinitialise USB periph when it is deactivated.
This commit is contained in:
parent
5f67b03e99
commit
3a723ad2fe
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue