aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/gpio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32/src/gpio.rs')
-rw-r--r--embassy-stm32/src/gpio.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs
index 37fedf8e1..e1702b008 100644
--- a/embassy-stm32/src/gpio.rs
+++ b/embassy-stm32/src/gpio.rs
@@ -1,6 +1,7 @@
1#![macro_use] 1#![macro_use]
2use core::convert::Infallible; 2use core::convert::Infallible;
3 3
4use critical_section::CriticalSection;
4use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef}; 5use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef};
5 6
6use crate::pac::gpio::{self, vals}; 7use crate::pac::gpio::{self, vals};
@@ -757,9 +758,9 @@ foreach_pin!(
757 }; 758 };
758); 759);
759 760
760pub(crate) unsafe fn init() { 761pub(crate) unsafe fn init(_cs: CriticalSection) {
761 #[cfg(afio)] 762 #[cfg(afio)]
762 <crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable_and_reset(); 763 <crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(_cs);
763 764
764 crate::_generated::init_gpio(); 765 crate::_generated::init_gpio();
765} 766}