aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/exti.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs
index bd4bab1f8..efa51fb24 100644
--- a/embassy-stm32/src/exti.rs
+++ b/embassy-stm32/src/exti.rs
@@ -6,7 +6,7 @@ use core::task::{Context, Poll};
6use embassy_hal_internal::impl_peripheral; 6use embassy_hal_internal::impl_peripheral;
7use embassy_sync::waitqueue::AtomicWaker; 7use embassy_sync::waitqueue::AtomicWaker;
8 8
9use crate::gpio::{AnyPin, Input, Pin as GpioPin}; 9use crate::gpio::{AnyPin, Input, Level, Pin as GpioPin};
10use crate::pac::exti::regs::Lines; 10use crate::pac::exti::regs::Lines;
11use crate::pac::EXTI; 11use crate::pac::EXTI;
12use crate::{interrupt, pac, peripherals, Peripheral}; 12use crate::{interrupt, pac, peripherals, Peripheral};
@@ -101,6 +101,10 @@ impl<'d, T: GpioPin> ExtiInput<'d, T> {
101 self.pin.is_low() 101 self.pin.is_low()
102 } 102 }
103 103
104 pub fn get_level(&self) -> Level {
105 self.pin.get_level()
106 }
107
104 pub async fn wait_for_high<'a>(&'a mut self) { 108 pub async fn wait_for_high<'a>(&'a mut self) {
105 let fut = ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), true, false); 109 let fut = ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), true, false);
106 if self.is_high() { 110 if self.is_high() {