Merge pull request #2011 from glaeqen/input-pin

stm32/gpio: Implement `eh1::digital::InputPin` for `OutputOpenDrain`
This commit is contained in:
xoviat 2023-10-04 17:36:26 +00:00 committed by GitHub
commit b887b7516e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -974,6 +974,18 @@ mod eh1 {
type Error = Infallible;
}
impl<'d, T: Pin> InputPin for OutputOpenDrain<'d, T> {
#[inline]
fn is_high(&self) -> Result<bool, Self::Error> {
Ok(self.is_high())
}
#[inline]
fn is_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_low())
}
}
impl<'d, T: Pin> OutputPin for OutputOpenDrain<'d, T> {
#[inline]
fn set_high(&mut self) -> Result<(), Self::Error> {