Skip to content

Commit 0fe3864

Browse files
committed
fix
1 parent 92f3b70 commit 0fe3864

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/rcc/enable.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
use super::*;
22

3+
macro_rules! bus {
4+
($($PER:ident => ($busX:ty, $bit:literal, $($en:ident)?, $($lpen:ident)?, $($rst:ident)?),)+) => {
5+
$(
6+
impl RccBus for crate::pac::$PER {
7+
type Bus = $busX;
8+
}
9+
$(bus_enable!($PER => $bit, $en);)?
10+
$(bus_lpenable!($PER => $bit, $lpen);)?
11+
$(bus_reset!($PER => $bit, $rst);)?
12+
)+
13+
}
14+
}
15+
use bus;
16+
317
macro_rules! bus_enable {
418
($PER:ident => $bit:literal, $en:ident) => {
519
impl $crate::rcc::Enable for crate::pac::$PER {

0 commit comments

Comments
 (0)