diff options
| author | Timo Kröger <[email protected]> | 2021-07-23 17:49:53 +0200 |
|---|---|---|
| committer | Timo Kröger <[email protected]> | 2021-07-23 17:54:14 +0200 |
| commit | 57eecd42926e917a55798c4a0fa463b45053687d (patch) | |
| tree | f419ff9149dd4e4b3262e6a88db35cf345459391 /examples/stm32f4/src/bin/button_exti.rs | |
| parent | 5ac91933ff0e4643823c77b357d90e82007fc9fb (diff) | |
Use `Dbgmcu::enable_all()` in stm32f4 examples
Diffstat (limited to 'examples/stm32f4/src/bin/button_exti.rs')
| -rw-r--r-- | examples/stm32f4/src/bin/button_exti.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/stm32f4/src/bin/button_exti.rs b/examples/stm32f4/src/bin/button_exti.rs index bccd3870d..6c51095eb 100644 --- a/examples/stm32f4/src/bin/button_exti.rs +++ b/examples/stm32f4/src/bin/button_exti.rs | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | mod example_common; | 10 | mod example_common; |
| 11 | use embassy::executor::Executor; | 11 | use embassy::executor::Executor; |
| 12 | use embassy::util::Forever; | 12 | use embassy::util::Forever; |
| 13 | use embassy_stm32::dbgmcu::Dbgmcu; | ||
| 13 | use embassy_stm32::exti::ExtiInput; | 14 | use embassy_stm32::exti::ExtiInput; |
| 14 | use embassy_stm32::gpio::{Input, Pull}; | 15 | use embassy_stm32::gpio::{Input, Pull}; |
| 15 | use embassy_traits::gpio::{WaitForFallingEdge, WaitForRisingEdge}; | 16 | use embassy_traits::gpio::{WaitForFallingEdge, WaitForRisingEdge}; |
| @@ -42,11 +43,7 @@ fn main() -> ! { | |||
| 42 | info!("Hello World!"); | 43 | info!("Hello World!"); |
| 43 | 44 | ||
| 44 | unsafe { | 45 | unsafe { |
| 45 | pac::DBGMCU.cr().modify(|w| { | 46 | Dbgmcu::enable_all(); |
| 46 | w.set_dbg_sleep(true); | ||
| 47 | w.set_dbg_standby(true); | ||
| 48 | w.set_dbg_stop(true); | ||
| 49 | }); | ||
| 50 | 47 | ||
| 51 | // EXTI clock | 48 | // EXTI clock |
| 52 | pac::RCC.apb2enr().modify(|w| { | 49 | pac::RCC.apb2enr().modify(|w| { |
