mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
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
@ -47,16 +47,17 @@ 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) => {
|
||||
crate::peripherals::$peri::enable()
|
||||
};
|
||||
{
|
||||
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 New Issue
Block a user