stm32: move dbgmcu stuff to toplevel config setting, defaulting to true.

This commit is contained in:
Dario Nieuwenhuis
2021-08-19 23:32:22 +02:00
parent 446d6c275c
commit 2c992f7010
46 changed files with 26 additions and 233 deletions

View File

@ -8,7 +8,6 @@
mod example_common;
use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_stm32::dbgmcu::Dbgmcu;
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_stm32::Peripherals;
use embedded_hal::digital::v2::OutputPin;
@ -18,8 +17,6 @@ use example_common::*;
async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello World!");
unsafe { Dbgmcu::enable_all() };
let mut led = Output::new(p.PB15, Level::High, Speed::Low);
loop {

View File

@ -6,10 +6,7 @@
#[path = "../example_common.rs"]
mod example_common;
use embassy_stm32::{
dbgmcu::Dbgmcu,
gpio::{Input, Level, Output, Pull, Speed},
};
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embedded_hal::digital::v2::{InputPin, OutputPin};
use example_common::*;
@ -21,8 +18,6 @@ fn main() -> ! {
let p = embassy_stm32::init(Default::default());
unsafe { Dbgmcu::enable_all() };
let button = Input::new(p.PA0, Pull::Up);
let mut led1 = Output::new(p.PB15, Level::High, Speed::Low);
let mut led2 = Output::new(p.PB9, Level::High, Speed::Low);

View File

@ -7,7 +7,6 @@
#[path = "../example_common.rs"]
mod example_common;
use embassy::executor::Spawner;
use embassy_stm32::dbgmcu::Dbgmcu;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::gpio::{Input, Pull};
use embassy_stm32::Peripherals;
@ -18,8 +17,6 @@ use example_common::*;
async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello World!");
unsafe { Dbgmcu::enable_all() };
let button = Input::new(p.PA0, Pull::Up);
let mut button = ExtiInput::new(button, p.EXTI0);