nrf/gpiote: update to new gpio

This commit is contained in:
Dario Nieuwenhuis
2021-03-20 03:09:42 +01:00
parent 3d3e770b8d
commit ba7b3974bb
3 changed files with 142 additions and 176 deletions

View File

@ -30,7 +30,7 @@ pub enum Pull {
/// GPIO input driver.
pub struct Input<T: Pin> {
pin: T,
pub(crate) pin: T,
}
impl<T: Pin> Input<T> {
@ -273,10 +273,8 @@ pub struct AnyPin {
}
impl AnyPin {
pub unsafe fn steal_from_psel_bits(psel_bits: u32) -> Self {
Self {
pin_port: psel_bits as u8,
}
pub unsafe fn steal(pin_port: u8) -> Self {
Self { pin_port }
}
}