aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorDániel Buga <[email protected]>2024-04-26 18:18:08 +0200
committerDániel Buga <[email protected]>2024-04-26 18:18:08 +0200
commit7ce2594eb78a0160928d6a39b778f552f034ddc3 (patch)
tree5158713b19636ee35488a8df96cb6ef64928d6b1 /embassy-stm32/src
parent50aefb417496f45a6c79abf2ac1737d737feb9ba (diff)
Reset inited flag to allow re-enabling
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/usb/otg.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-stm32/src/usb/otg.rs b/embassy-stm32/src/usb/otg.rs
index 0525718e1..fa1a80b17 100644
--- a/embassy-stm32/src/usb/otg.rs
+++ b/embassy-stm32/src/usb/otg.rs
@@ -245,6 +245,7 @@ impl<'d, T: Instance> Bus<'d, T> {
245 T::Interrupt::disable(); 245 T::Interrupt::disable();
246 246
247 <T as SealedRccPeripheral>::disable(); 247 <T as SealedRccPeripheral>::disable();
248 self.inited = false;
248 249
249 #[cfg(stm32l4)] 250 #[cfg(stm32l4)]
250 crate::pac::PWR.cr2().modify(|w| w.set_usv(false)); 251 crate::pac::PWR.cr2().modify(|w| w.set_usv(false));