diff options
author | amugniere@gmail.com <antoine.mugnier@depixus.com> | 2022-07-08 22:16:01 +0200 |
---|---|---|
committer | amugniere@gmail.com <antoine.mugnier@depixus.com> | 2022-07-08 22:16:01 +0200 |
commit | dda528808a87af23feafb709dbcd665da91d5547 (patch) | |
tree | 6be68b8f5b785f29133ba6b161872004e858717a /tests | |
parent | 00df9b507c66526dee1e395fc82a0f71b17c557e (diff) | |
download | embassy-dda528808a87af23feafb709dbcd665da91d5547.zip |
Flex/ output open drain test done
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stm32/src/bin/gpio.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs index edcb1eca..2cdf52c0 100644 --- a/tests/stm32/src/bin/gpio.rs +++ b/tests/stm32/src/bin/gpio.rs @@ -172,20 +172,21 @@ async fn main(_spawner: Spawner, p: Peripherals) { delay(); assert!(b.is_low()); } - /* + // Test output open drain { - let b = Input::new(&mut b, Pull::Down); - // no pull, the status is undefined + let mut b = Flex::new(&mut b); + b.set_as_input(Pull::Down); - let mut a = OutputOpenDrain::new(&mut a, Level::Low, Speed::Low, Pull::None); + let mut a = Flex::new(&mut a); + a.set_low(); + a.set_as_input_output(Speed::Low, Pull::None); delay(); assert!(b.is_low()); a.set_high(); // High-Z output delay(); assert!(b.is_low()); } -*/ info!("Test OK"); cortex_m::asm::bkpt(); |