Continuing to update clocks (unused now) and SPI

This commit is contained in:
Bob McWhirter
2021-05-12 10:46:18 -04:00
parent 7d52e1b350
commit 36c16dbef8
86 changed files with 7131 additions and 6906 deletions

View File

@ -228,6 +228,16 @@ impl AnyPin {
pub unsafe fn steal(pin_port: u8) -> Self {
Self { pin_port }
}
#[inline]
fn _port(&self) -> u8 {
self.pin_port / 16
}
#[inline]
pub fn block(&self) -> gpio::Gpio {
pac::GPIO(self._port() as _)
}
}
impl_unborrow!(AnyPin);