Rename PeripheralBorrow to Unborrow

This commit is contained in:
Dario Nieuwenhuis
2021-04-14 19:59:52 +02:00
parent bac53e3e55
commit 97ca54fa66
12 changed files with 61 additions and 64 deletions

View File

@ -147,14 +147,14 @@ pub fn interrupt_declare(item: TokenStream) -> TokenStream {
}
}
impl ::embassy::util::PeripheralBorrow for #name_interrupt {
impl ::embassy::util::Unborrow for #name_interrupt {
type Target = #name_interrupt;
unsafe fn unborrow(self) -> #name_interrupt {
self
}
}
impl ::embassy::util::PeripheralBorrow for &mut #name_interrupt {
impl ::embassy::util::Unborrow for &mut #name_interrupt {
type Target = #name_interrupt;
unsafe fn unborrow(self) -> #name_interrupt {
::core::ptr::read(self)