stm32: No need to enable GPIO clocks manually

This commit is contained in:
Timo Kröger
2021-07-23 14:24:38 +02:00
parent ec5d44333a
commit 5ac91933ff
21 changed files with 36 additions and 221 deletions

View File

@ -25,15 +25,6 @@ fn main() -> ! {
w.set_dbg_standby(true);
w.set_dbg_stop(true);
});
pac::RCC.ahb1enr().modify(|w| {
w.set_gpioaen(true);
w.set_gpioben(true);
w.set_gpiocen(true);
w.set_gpioden(true);
w.set_gpioeen(true);
w.set_gpiofen(true);
});
}
let p = embassy_stm32::init(Default::default());

View File

@ -24,15 +24,6 @@ fn main() -> ! {
w.set_dbg_standby(true);
w.set_dbg_stop(true);
});
pac::RCC.ahb1enr().modify(|w| {
w.set_gpioaen(true);
w.set_gpioben(true);
w.set_gpiocen(true);
w.set_gpioden(true);
w.set_gpioeen(true);
w.set_gpiofen(true);
});
}
let p = embassy_stm32::init(Default::default());

View File

@ -48,15 +48,6 @@ fn main() -> ! {
w.set_dbg_stop(true);
});
pac::RCC.ahb1enr().modify(|w| {
w.set_gpioaen(true);
w.set_gpioben(true);
w.set_gpiocen(true);
w.set_gpioden(true);
w.set_gpioeen(true);
w.set_gpiofen(true);
});
// EXTI clock
pac::RCC.apb2enr().modify(|w| {
w.set_syscfgen(true);

View File

@ -14,11 +14,11 @@ use embedded_hal::digital::v2::OutputPin;
use example_common::*;
use cortex_m_rt::entry;
use embassy_stm32::dbgmcu::Dbgmcu;
use embassy_stm32::pac;
use embassy_stm32::spi::{Config, Spi};
use embassy_stm32::time::Hertz;
use embedded_hal::blocking::spi::Transfer;
use embassy_stm32::dbgmcu::Dbgmcu;
#[entry]
fn main() -> ! {
@ -26,15 +26,6 @@ fn main() -> ! {
unsafe {
Dbgmcu::enable_all();
pac::RCC.ahb1enr().modify(|w| {
w.set_gpioaen(true);
w.set_gpioben(true);
w.set_gpiocen(true);
w.set_gpioden(true);
w.set_gpioeen(true);
w.set_gpiofen(true);
});
}
let p = embassy_stm32::init(Default::default());

View File

@ -47,15 +47,6 @@ fn main() -> ! {
w.set_dbg_standby(true);
w.set_dbg_stop(true);
});
pac::RCC.ahb1enr().modify(|w| {
w.set_gpioaen(true);
w.set_gpioben(true);
w.set_gpiocen(true);
w.set_gpioden(true);
w.set_gpioeen(true);
w.set_gpiofen(true);
});
}
let executor = EXECUTOR.put(Executor::new());