diff options
| author | [email protected] <[email protected]> | 2022-07-08 22:02:49 +0200 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2022-07-08 22:02:49 +0200 |
| commit | 555f18aa95651f39ea62d965e348ba62eab71414 (patch) | |
| tree | 4200a89a3361076d79c0583e83997b72947be43c /tests | |
| parent | f911ad25c3cb1155dc47cf9bd7de31628562c6a9 (diff) | |
Flex/ input no pull test done
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/gpio.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs index 2692f25fc..b82ad81a7 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) { | |||
| 122 | assert!(b.is_high()); | 122 | assert!(b.is_high()); |
| 123 | } | 123 | } |
| 124 | } | 124 | } |
| 125 | /* | 125 | |
| 126 | // Test input no pull | 126 | // Test input no pull |
| 127 | { | 127 | { |
| 128 | let b = Input::new(&mut b, Pull::None); | 128 | let mut b = Flex::new(&mut b); |
| 129 | // no pull, the status is undefined | 129 | b.set_as_input(Pull::None); // no pull, the status is undefined |
| 130 | 130 | ||
| 131 | let mut a = Output::new(&mut a, Level::Low, Speed::Low); | 131 | let mut a = Flex::new(&mut a); |
| 132 | a.set_low(); | ||
| 133 | a.set_as_output(Speed::Low); | ||
| 132 | delay(); | 134 | delay(); |
| 133 | assert!(b.is_low()); | 135 | assert!(b.is_low()); |
| 134 | a.set_high(); | 136 | a.set_high(); |
| @@ -136,6 +138,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 136 | assert!(b.is_high()); | 138 | assert!(b.is_high()); |
| 137 | } | 139 | } |
| 138 | 140 | ||
| 141 | /* | ||
| 139 | // Test input pulldown | 142 | // Test input pulldown |
| 140 | { | 143 | { |
| 141 | let b = Input::new(&mut b, Pull::Down); | 144 | let b = Input::new(&mut b, Pull::Down); |
