aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin/button_exti.rs
diff options
context:
space:
mode:
authorTimo Kröger <[email protected]>2021-07-23 17:49:53 +0200
committerTimo Kröger <[email protected]>2021-07-23 17:54:14 +0200
commit57eecd42926e917a55798c4a0fa463b45053687d (patch)
treef419ff9149dd4e4b3262e6a88db35cf345459391 /examples/stm32f4/src/bin/button_exti.rs
parent5ac91933ff0e4643823c77b357d90e82007fc9fb (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.rs7
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 @@
10mod example_common; 10mod example_common;
11use embassy::executor::Executor; 11use embassy::executor::Executor;
12use embassy::util::Forever; 12use embassy::util::Forever;
13use embassy_stm32::dbgmcu::Dbgmcu;
13use embassy_stm32::exti::ExtiInput; 14use embassy_stm32::exti::ExtiInput;
14use embassy_stm32::gpio::{Input, Pull}; 15use embassy_stm32::gpio::{Input, Pull};
15use embassy_traits::gpio::{WaitForFallingEdge, WaitForRisingEdge}; 16use 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| {