stm32: remove psel_bits

This commit is contained in:
Dario Nieuwenhuis 2021-05-15 02:45:58 +02:00
parent 8bb1bc3507
commit e63c4bde0b

View file

@ -223,11 +223,6 @@ pub trait Pin: sealed::Pin + Sized {
self._port() self._port()
} }
#[inline]
fn psel_bits(&self) -> u32 {
self.pin_port() as u32
}
/// Convert from concrete pin type PX_XX to type erased `AnyPin`. /// Convert from concrete pin type PX_XX to type erased `AnyPin`.
#[inline] #[inline]
fn degrade(self) -> AnyPin { fn degrade(self) -> AnyPin {
@ -277,11 +272,6 @@ pub trait OptionalPin: sealed::OptionalPin + Sized {
fn pin(&self) -> Option<&Self::Pin>; fn pin(&self) -> Option<&Self::Pin>;
fn pin_mut(&mut self) -> Option<&mut Self::Pin>; fn pin_mut(&mut self) -> Option<&mut Self::Pin>;
#[inline]
fn psel_bits(&self) -> u32 {
self.pin().map_or(1u32 << 31, |pin| Pin::psel_bits(pin))
}
/// Convert from concrete pin type PX_XX to type erased `Option<AnyPin>`. /// Convert from concrete pin type PX_XX to type erased `Option<AnyPin>`.
#[inline] #[inline]
fn degrade_optional(mut self) -> Option<AnyPin> { fn degrade_optional(mut self) -> Option<AnyPin> {