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.rs | |
| parent | 5ac91933ff0e4643823c77b357d90e82007fc9fb (diff) | |
Use `Dbgmcu::enable_all()` in stm32f4 examples
Diffstat (limited to 'examples/stm32f4/src/bin/button.rs')
| -rw-r--r-- | examples/stm32f4/src/bin/button.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/stm32f4/src/bin/button.rs b/examples/stm32f4/src/bin/button.rs index 395ec4847..c61e85f09 100644 --- a/examples/stm32f4/src/bin/button.rs +++ b/examples/stm32f4/src/bin/button.rs | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | #[path = "../example_common.rs"] | 9 | #[path = "../example_common.rs"] |
| 10 | mod example_common; | 10 | mod example_common; |
| 11 | use cortex_m_rt::entry; | 11 | use cortex_m_rt::entry; |
| 12 | use embassy_stm32::dbgmcu::Dbgmcu; | ||
| 12 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; | 13 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::pac; | ||
| 14 | use embedded_hal::digital::v2::{InputPin, OutputPin}; | 14 | use embedded_hal::digital::v2::{InputPin, OutputPin}; |
| 15 | use example_common::*; | 15 | use example_common::*; |
| 16 | 16 | ||
| @@ -19,11 +19,7 @@ fn main() -> ! { | |||
| 19 | info!("Hello World!"); | 19 | info!("Hello World!"); |
| 20 | 20 | ||
| 21 | unsafe { | 21 | unsafe { |
| 22 | pac::DBGMCU.cr().modify(|w| { | 22 | Dbgmcu::enable_all(); |
| 23 | w.set_dbg_sleep(true); | ||
| 24 | w.set_dbg_standby(true); | ||
| 25 | w.set_dbg_stop(true); | ||
| 26 | }); | ||
| 27 | } | 23 | } |
| 28 | 24 | ||
| 29 | let p = embassy_stm32::init(Default::default()); | 25 | let p = embassy_stm32::init(Default::default()); |
