diff options
| author | Timo Kröger <[email protected]> | 2021-07-22 23:12:07 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-07-24 11:13:49 +0200 |
| commit | 06fb2a7a808d9c05d9724fc4239e2efde1d3511a (patch) | |
| tree | 90166bba1d822e943a2719dd2f8f766acbbd6375 /examples/stm32f4 | |
| parent | ad7a1f1453264717fea90d5ce3ee66df8ff6130c (diff) | |
Enable SYSCFG clock in `exti::init()`
Diffstat (limited to 'examples/stm32f4')
| -rw-r--r-- | examples/stm32f4/src/bin/button_exti.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/stm32f4/src/bin/button_exti.rs b/examples/stm32f4/src/bin/button_exti.rs index 6c51095eb..bc48c2b12 100644 --- a/examples/stm32f4/src/bin/button_exti.rs +++ b/examples/stm32f4/src/bin/button_exti.rs | |||
| @@ -17,7 +17,6 @@ use embassy_traits::gpio::{WaitForFallingEdge, WaitForRisingEdge}; | |||
| 17 | use example_common::*; | 17 | use example_common::*; |
| 18 | 18 | ||
| 19 | use cortex_m_rt::entry; | 19 | use cortex_m_rt::entry; |
| 20 | use embassy_stm32::pac; | ||
| 21 | 20 | ||
| 22 | #[embassy::task] | 21 | #[embassy::task] |
| 23 | async fn main_task() { | 22 | async fn main_task() { |
| @@ -42,14 +41,7 @@ static EXECUTOR: Forever<Executor> = Forever::new(); | |||
| 42 | fn main() -> ! { | 41 | fn main() -> ! { |
| 43 | info!("Hello World!"); | 42 | info!("Hello World!"); |
| 44 | 43 | ||
| 45 | unsafe { | 44 | unsafe { Dbgmcu::enable_all() } |
| 46 | Dbgmcu::enable_all(); | ||
| 47 | |||
| 48 | // EXTI clock | ||
| 49 | pac::RCC.apb2enr().modify(|w| { | ||
| 50 | w.set_syscfgen(true); | ||
| 51 | }); | ||
| 52 | } | ||
| 53 | 45 | ||
| 54 | let executor = EXECUTOR.put(Executor::new()); | 46 | let executor = EXECUTOR.put(Executor::new()); |
| 55 | 47 | ||
