nrf: add unborrow! macro

This commit is contained in:
Dario Nieuwenhuis
2021-03-21 22:09:06 +01:00
parent a134fce122
commit 7b6086d19e
3 changed files with 17 additions and 17 deletions

View File

@ -73,3 +73,12 @@ macro_rules! peripherals {
};
}
#[macro_export]
macro_rules! unborrow {
($($name:ident),*) => {
$(
let $name = unsafe { $name.unborrow() };
)*
}
}