diff options
Diffstat (limited to 'embassy-stm32/src/gpio.rs')
| -rw-r--r-- | embassy-stm32/src/gpio.rs | 5 |
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] |
| 2 | use core::convert::Infallible; | 2 | use core::convert::Infallible; |
| 3 | 3 | ||
| 4 | use critical_section::CriticalSection; | ||
| 4 | use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef}; | 5 | use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef}; |
| 5 | 6 | ||
| 6 | use crate::pac::gpio::{self, vals}; | 7 | use crate::pac::gpio::{self, vals}; |
| @@ -757,9 +758,9 @@ foreach_pin!( | |||
| 757 | }; | 758 | }; |
| 758 | ); | 759 | ); |
| 759 | 760 | ||
| 760 | pub(crate) unsafe fn init() { | 761 | pub(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 | } |
