671: nrf/gpio: Make Input is_high/is_low public. r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
This commit is contained in:
bors[bot] 2022-03-17 22:28:32 +00:00 committed by GitHub
commit 842a1ae30b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -47,11 +47,11 @@ impl<'d, T: Pin> Input<'d, T> {
Self { pin }
}
fn is_high(&self) -> bool {
pub fn is_high(&self) -> bool {
self.pin.is_high()
}
fn is_low(&self) -> bool {
pub fn is_low(&self) -> bool {
self.pin.is_low()
}
}

View file

@ -451,11 +451,11 @@ mod eh02 {
type Error = Infallible;
fn is_high(&self) -> Result<bool, Self::Error> {
self.pin.is_high()
Ok(self.pin.is_high())
}
fn is_low(&self) -> Result<bool, Self::Error> {
self.pin.is_low()
Ok(self.pin.is_low())
}
}
}
@ -472,11 +472,11 @@ mod eh1 {
for InputChannel<'d, C, T>
{
fn is_high(&self) -> Result<bool, Self::Error> {
self.pin.is_high()
Ok(self.pin.is_high())
}
fn is_low(&self) -> Result<bool, Self::Error> {
self.pin.is_low()
Ok(self.pin.is_low())
}
}
}