aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-03-17 22:28:32 +0000
committerGitHub <[email protected]>2022-03-17 22:28:32 +0000
commit842a1ae30bf9fa27a9f0dc0b5663a763a2943455 (patch)
treeb1c5a6bc78f979d135e119ab9d8cab288b63330a
parent5f39f136169bd1d2057d9c84ca1d49b21a2c50e0 (diff)
parent6d994351a6fed8e5e983b5e5ab63e032aff569b6 (diff)
Merge #671
671: nrf/gpio: Make Input is_high/is_low public. r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <[email protected]>
-rw-r--r--embassy-nrf/src/gpio.rs4
-rw-r--r--embassy-nrf/src/gpiote.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs
index 09202e2f1..c33cca64b 100644
--- a/embassy-nrf/src/gpio.rs
+++ b/embassy-nrf/src/gpio.rs
@@ -47,11 +47,11 @@ impl<'d, T: Pin> Input<'d, T> {
47 Self { pin } 47 Self { pin }
48 } 48 }
49 49
50 fn is_high(&self) -> bool { 50 pub fn is_high(&self) -> bool {
51 self.pin.is_high() 51 self.pin.is_high()
52 } 52 }
53 53
54 fn is_low(&self) -> bool { 54 pub fn is_low(&self) -> bool {
55 self.pin.is_low() 55 self.pin.is_low()
56 } 56 }
57} 57}
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs
index 32b5d908d..c0bfd9d65 100644
--- a/embassy-nrf/src/gpiote.rs
+++ b/embassy-nrf/src/gpiote.rs
@@ -451,11 +451,11 @@ mod eh02 {
451 type Error = Infallible; 451 type Error = Infallible;
452 452
453 fn is_high(&self) -> Result<bool, Self::Error> { 453 fn is_high(&self) -> Result<bool, Self::Error> {
454 self.pin.is_high() 454 Ok(self.pin.is_high())
455 } 455 }
456 456
457 fn is_low(&self) -> Result<bool, Self::Error> { 457 fn is_low(&self) -> Result<bool, Self::Error> {
458 self.pin.is_low() 458 Ok(self.pin.is_low())
459 } 459 }
460 } 460 }
461} 461}
@@ -472,11 +472,11 @@ mod eh1 {
472 for InputChannel<'d, C, T> 472 for InputChannel<'d, C, T>
473 { 473 {
474 fn is_high(&self) -> Result<bool, Self::Error> { 474 fn is_high(&self) -> Result<bool, Self::Error> {
475 self.pin.is_high() 475 Ok(self.pin.is_high())
476 } 476 }
477 477
478 fn is_low(&self) -> Result<bool, Self::Error> { 478 fn is_low(&self) -> Result<bool, Self::Error> {
479 self.pin.is_low() 479 Ok(self.pin.is_low())
480 } 480 }
481 } 481 }
482} 482}