aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2021-05-25 13:32:10 +0200
committerUlf Lilleengen <[email protected]>2021-05-25 13:32:10 +0200
commitef254647f7bae68ae2f754071635a743b678fd61 (patch)
treeb26a8dabb73e99bfa09943810c61c405c187a354
parent1c10e746b61460488e7e9c6d64f992a247b4c236 (diff)
Add stm32l0
-rw-r--r--embassy-stm32/src/rcc/l0/mod.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/embassy-stm32/src/rcc/l0/mod.rs b/embassy-stm32/src/rcc/l0/mod.rs
new file mode 100644
index 000000000..000aaa9e0
--- /dev/null
+++ b/embassy-stm32/src/rcc/l0/mod.rs
@@ -0,0 +1,20 @@
1use crate::pac;
2use embassy::util::Steal;
3use pac::rcc::{self, vals};
4
5#[derive(Default)]
6pub struct Config {}
7
8pub unsafe fn init(config: Config) {
9 let rcc = pac::RCC;
10
11 let enabled = vals::Iophen::ENABLED;
12 rcc.iopenr().write(|w| {
13 w.set_iopaen(enabled);
14 w.set_iopben(enabled);
15 w.set_iopcen(enabled);
16 w.set_iopden(enabled);
17 w.set_iopeen(enabled);
18 w.set_iophen(enabled);
19 });
20}