have adapted access to pin() and port() methods of Sealed::Pin in exti.rs according to previous changes on Input struct

This commit is contained in:
amugniere@gmail.com 2022-07-10 20:55:04 +02:00
parent fa3e1ab68a
commit 53388d4576

View File

@ -99,7 +99,7 @@ impl<'d, T: GpioPin> ExtiInput<'d, T> {
} }
pub async fn wait_for_high<'a>(&'a mut self) { pub async fn wait_for_high<'a>(&'a mut self) {
let fut = ExtiInputFuture::new(self.pin.pin.pin(), self.pin.pin.port(), true, false); let fut = ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), true, false);
if self.is_high() { if self.is_high() {
return; return;
} }
@ -107,7 +107,7 @@ impl<'d, T: GpioPin> ExtiInput<'d, T> {
} }
pub async fn wait_for_low<'a>(&'a mut self) { pub async fn wait_for_low<'a>(&'a mut self) {
let fut = ExtiInputFuture::new(self.pin.pin.pin(), self.pin.pin.port(), false, true); let fut = ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), false, true);
if self.is_low() { if self.is_low() {
return; return;
} }
@ -115,15 +115,15 @@ impl<'d, T: GpioPin> ExtiInput<'d, T> {
} }
pub async fn wait_for_rising_edge<'a>(&'a mut self) { pub async fn wait_for_rising_edge<'a>(&'a mut self) {
ExtiInputFuture::new(self.pin.pin.pin(), self.pin.pin.port(), true, false).await ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), true, false).await
} }
pub async fn wait_for_falling_edge<'a>(&'a mut self) { pub async fn wait_for_falling_edge<'a>(&'a mut self) {
ExtiInputFuture::new(self.pin.pin.pin(), self.pin.pin.port(), false, true).await ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), false, true).await
} }
pub async fn wait_for_any_edge<'a>(&'a mut self) { pub async fn wait_for_any_edge<'a>(&'a mut self) {
ExtiInputFuture::new(self.pin.pin.pin(), self.pin.pin.port(), true, true).await ExtiInputFuture::new(self.pin.pin.pin.pin(), self.pin.pin.pin.port(), true, true).await
} }
} }