stm32/metapac: check GPIO RCC regs are always found.
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user