nrf/gpio: Make Input is_high/is_low public.

This commit is contained in:
Dario Nieuwenhuis 2022-03-17 23:20:09 +01:00
parent 5f39f13616
commit 6d994351a6
2 changed files with 6 additions and 6 deletions

View file

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

View file

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