aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-12-14 16:01:51 +0100
committerDario Nieuwenhuis <[email protected]>2023-12-14 16:19:32 +0100
commitd81395fab3c4e336650b0481790ecdab7d7aa13f (patch)
tree449a894b8564dde713fff1e83cd717d263327b96 /tests/stm32
parent2c3d3992200939f71708c8b47d839328dcb12098 (diff)
Update embedded-hal to 1.0.0-rc.3
Diffstat (limited to 'tests/stm32')
-rw-r--r--tests/stm32/Cargo.toml4
-rw-r--r--tests/stm32/src/bin/gpio.rs12
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index 4f53e84f0..bdec41571 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -63,8 +63,8 @@ defmt-rtt = "0.4"
63cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } 63cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
64cortex-m-rt = "0.7.0" 64cortex-m-rt = "0.7.0"
65embedded-hal = "0.2.6" 65embedded-hal = "0.2.6"
66embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } 66embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" }
67embedded-hal-async = { version = "=1.0.0-rc.2" } 67embedded-hal-async = { version = "=1.0.0-rc.3" }
68micromath = "2.0.0" 68micromath = "2.0.0"
69panic-probe = { version = "0.3.0", features = ["print-defmt"] } 69panic-probe = { version = "0.3.0", features = ["print-defmt"] }
70rand_core = { version = "0.6", default-features = false } 70rand_core = { version = "0.6", default-features = false }
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs
index c4e2fe161..9f1993024 100644
--- a/tests/stm32/src/bin/gpio.rs
+++ b/tests/stm32/src/bin/gpio.rs
@@ -20,10 +20,10 @@ async fn main(_spawner: Spawner) {
20 20
21 // Test initial output 21 // Test initial output
22 { 22 {
23 let b = Input::new(&mut b, Pull::None); 23 let mut b = Input::new(&mut b, Pull::None);
24 24
25 { 25 {
26 let a = Output::new(&mut a, Level::Low, Speed::Low); 26 let mut a = Output::new(&mut a, Level::Low, Speed::Low);
27 delay(); 27 delay();
28 assert!(b.is_low()); 28 assert!(b.is_low());
29 assert!(!b.is_high()); 29 assert!(!b.is_high());
@@ -68,7 +68,7 @@ async fn main(_spawner: Spawner) {
68 68
69 // Test input no pull 69 // Test input no pull
70 { 70 {
71 let b = Input::new(&mut b, Pull::None); 71 let mut b = Input::new(&mut b, Pull::None);
72 // no pull, the status is undefined 72 // no pull, the status is undefined
73 73
74 let mut a = Output::new(&mut a, Level::Low, Speed::Low); 74 let mut a = Output::new(&mut a, Level::Low, Speed::Low);
@@ -81,7 +81,7 @@ async fn main(_spawner: Spawner) {
81 81
82 // Test input pulldown 82 // Test input pulldown
83 { 83 {
84 let b = Input::new(&mut b, Pull::Down); 84 let mut b = Input::new(&mut b, Pull::Down);
85 delay(); 85 delay();
86 assert!(b.is_low()); 86 assert!(b.is_low());
87 87
@@ -95,7 +95,7 @@ async fn main(_spawner: Spawner) {
95 95
96 // Test input pullup 96 // Test input pullup
97 { 97 {
98 let b = Input::new(&mut b, Pull::Up); 98 let mut b = Input::new(&mut b, Pull::Up);
99 delay(); 99 delay();
100 assert!(b.is_high()); 100 assert!(b.is_high());
101 101
@@ -109,7 +109,7 @@ async fn main(_spawner: Spawner) {
109 109
110 // Test output open drain 110 // Test output open drain
111 { 111 {
112 let b = Input::new(&mut b, Pull::Down); 112 let mut b = Input::new(&mut b, Pull::Down);
113 // no pull, the status is undefined 113 // no pull, the status is undefined
114 114
115 let mut a = OutputOpenDrain::new(&mut a, Level::Low, Speed::Low, Pull::None); 115 let mut a = OutputOpenDrain::new(&mut a, Level::Low, Speed::Low, Pull::None);