Move the use
inside the macro call, inside another set of braces in case it percolates up twice.
This commit is contained in:
parent
a72816492a
commit
bbff98ed0d
1 changed files with 7 additions and 6 deletions
|
@ -47,17 +47,18 @@ pac::dma_channels! {
|
|||
};
|
||||
}
|
||||
|
||||
use crate::rcc::sealed::RccPeripheral;
|
||||
|
||||
/// safety: must be called only once
|
||||
pub(crate) unsafe fn init() {
|
||||
pac::peripherals! {
|
||||
(dmamux, $peri:ident) => {
|
||||
{
|
||||
pac::peripheral_rcc! {
|
||||
($peri, $clock:ident, $en_reg:ident, $rst_reg:ident, $en_fn:ident, $rst_fn:ident) => {
|
||||
use crate::rcc::sealed::RccPeripheral;
|
||||
crate::peripherals::$peri::enable()
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue