From 555f18aa95651f39ea62d965e348ba62eab71414 Mon Sep 17 00:00:00 2001 From: "amugniere@gmail.com" Date: Fri, 8 Jul 2022 22:02:49 +0200 Subject: [PATCH] Flex/ input no pull test done --- tests/stm32/src/bin/gpio.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs index 2692f25f..b82ad81a 100644 --- a/tests/stm32/src/bin/gpio.rs +++ b/tests/stm32/src/bin/gpio.rs @@ -122,13 +122,15 @@ async fn main(_spawner: Spawner, p: Peripherals) { assert!(b.is_high()); } } - /* + // Test input no pull { - let b = Input::new(&mut b, Pull::None); - // no pull, the status is undefined + let mut b = Flex::new(&mut b); + b.set_as_input(Pull::None); // no pull, the status is undefined - let mut a = Output::new(&mut a, Level::Low, Speed::Low); + let mut a = Flex::new(&mut a); + a.set_low(); + a.set_as_output(Speed::Low); delay(); assert!(b.is_low()); a.set_high(); @@ -136,6 +138,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { assert!(b.is_high()); } + /* // Test input pulldown { let b = Input::new(&mut b, Pull::Down);