summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/stm32/usb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c
index af9082299e..631dc8a19d 100644
--- a/chip/stm32/usb.c
+++ b/chip/stm32/usb.c
@@ -336,6 +336,8 @@ void usb_release(void)
/* disable USB device clock */
STM32_RCC_APB1ENR &= ~STM32_RCC_PB1_USB;
}
+/* ensure the host disconnects and reconnects over a sysjump */
+DECLARE_HOOK(HOOK_SYSJUMP, usb_release, HOOK_PRIO_DEFAULT);
int usb_is_enabled(void)
{