Add stm32l0
This commit is contained in:
parent
1c10e746b6
commit
ef254647f7
20
embassy-stm32/src/rcc/l0/mod.rs
Normal file
20
embassy-stm32/src/rcc/l0/mod.rs
Normal file
@ -0,0 +1,20 @@
|
||||
use crate::pac;
|
||||
use embassy::util::Steal;
|
||||
use pac::rcc::{self, vals};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Config {}
|
||||
|
||||
pub unsafe fn init(config: Config) {
|
||||
let rcc = pac::RCC;
|
||||
|
||||
let enabled = vals::Iophen::ENABLED;
|
||||
rcc.iopenr().write(|w| {
|
||||
w.set_iopaen(enabled);
|
||||
w.set_iopben(enabled);
|
||||
w.set_iopcen(enabled);
|
||||
w.set_iopden(enabled);
|
||||
w.set_iopeen(enabled);
|
||||
w.set_iophen(enabled);
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user