stm32/metapac: check GPIO RCC regs are always found.

This commit is contained in:
Dario Nieuwenhuis
2021-08-19 23:51:53 +02:00
parent 2c992f7010
commit 174c51f097
4 changed files with 10 additions and 32 deletions

View File

@ -202,18 +202,6 @@ impl<'d> Rcc<'d> {
}
pub unsafe fn init(config: Config) {
RCC.ahbenr().modify(|w| {
w.set_iopaen(true);
w.set_iopben(true);
w.set_iopcen(true);
w.set_iopden(true);
#[cfg(rcc_f0)]
w.set_iopeen(true);
w.set_iopfen(true);
});
let rcc = Rcc::new(<peripherals::RCC as embassy::util::Steal>::steal(), config);
let clocks = rcc.freeze();
set_freqs(clocks);

View File

@ -377,16 +377,6 @@ impl RccExt for RCC {
pub struct HSI48(());
pub unsafe fn init(config: Config) {
let rcc = pac::RCC;
rcc.iopenr().write(|w| {
w.set_iopaen(true);
w.set_iopben(true);
w.set_iopcen(true);
w.set_iopden(true);
w.set_iopeen(true);
w.set_iophen(true);
});
let r = <peripherals::RCC as embassy::util::Steal>::steal();
let clocks = r.freeze(config);
set_freqs(clocks);