diff options
| author | Bob McWhirter <[email protected]> | 2021-07-22 14:38:45 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-07-23 11:32:19 -0400 |
| commit | 13873df30b6fc2cdb0520ecd706a4f00e6afc528 (patch) | |
| tree | f8a1b833dbdaa0484b283dfb3520e79b7b5647da /examples | |
| parent | e91c04a6730fc90df296bd0bee0c7262262fbbda (diff) | |
Auto-enable all GPIOs during init().
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32h7/src/bin/usart_dma.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/examples/stm32h7/src/bin/usart_dma.rs b/examples/stm32h7/src/bin/usart_dma.rs index 097466cea..907356500 100644 --- a/examples/stm32h7/src/bin/usart_dma.rs +++ b/examples/stm32h7/src/bin/usart_dma.rs | |||
| @@ -71,22 +71,10 @@ fn main() -> ! { | |||
| 71 | .pll1_q_ck(48.mhz()) | 71 | .pll1_q_ck(48.mhz()) |
| 72 | .freeze(pwrcfg, &pp.SYSCFG); | 72 | .freeze(pwrcfg, &pp.SYSCFG); |
| 73 | 73 | ||
| 74 | let pp = unsafe { pac::Peripherals::steal() }; | ||
| 75 | |||
| 76 | unsafe { | 74 | unsafe { |
| 77 | Dbgmcu::enable_all(); | 75 | Dbgmcu::enable_all(); |
| 78 | } | 76 | } |
| 79 | 77 | ||
| 80 | pp.RCC.ahb4enr.modify(|_, w| { | ||
| 81 | w.gpioaen().set_bit(); | ||
| 82 | w.gpioben().set_bit(); | ||
| 83 | w.gpiocen().set_bit(); | ||
| 84 | w.gpioden().set_bit(); | ||
| 85 | w.gpioeen().set_bit(); | ||
| 86 | w.gpiofen().set_bit(); | ||
| 87 | w | ||
| 88 | }); | ||
| 89 | |||
| 90 | unsafe { embassy::time::set_clock(&ZeroClock) }; | 78 | unsafe { embassy::time::set_clock(&ZeroClock) }; |
| 91 | 79 | ||
| 92 | let executor = EXECUTOR.put(Executor::new()); | 80 | let executor = EXECUTOR.put(Executor::new()); |
