Flex/ output open drain test done

This commit is contained in:
amugniere@gmail.com 2022-07-08 22:16:01 +02:00
parent 00df9b507c
commit dda528808a

View file

@ -172,20 +172,21 @@ async fn main(_spawner: Spawner, p: Peripherals) {
delay(); delay();
assert!(b.is_low()); assert!(b.is_low());
} }
/*
// Test output open drain // Test output open drain
{ {
let b = Input::new(&mut b, Pull::Down); let mut b = Flex::new(&mut b);
// no pull, the status is undefined 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(); delay();
assert!(b.is_low()); assert!(b.is_low());
a.set_high(); // High-Z output a.set_high(); // High-Z output
delay(); delay();
assert!(b.is_low()); assert!(b.is_low());
} }
*/
info!("Test OK"); info!("Test OK");
cortex_m::asm::bkpt(); cortex_m::asm::bkpt();