diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/nrf/Cargo.toml | 4 | ||||
| -rw-r--r-- | tests/rp/Cargo.toml | 6 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio.rs | 10 | ||||
| -rw-r--r-- | tests/rp/src/bin/pwm.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/Cargo.toml | 4 | ||||
| -rw-r--r-- | tests/stm32/src/bin/gpio.rs | 12 |
6 files changed, 22 insertions, 22 deletions
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml index 7b0d59ee2..b6067abcc 100644 --- a/tests/nrf/Cargo.toml +++ b/tests/nrf/Cargo.toml | |||
| @@ -16,8 +16,8 @@ embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | |||
| 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } | 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } |
| 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } | 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } |
| 18 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } | 18 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } |
| 19 | embedded-hal-async = { version = "1.0.0-rc.2" } | 19 | embedded-hal-async = { version = "1.0.0-rc.3" } |
| 20 | embedded-hal-bus = { version = "0.1.0-rc.2", features = ["async"] } | 20 | embedded-hal-bus = { version = "0.1.0-rc.3", features = ["async"] } |
| 21 | static_cell = { version = "2", features = [ "nightly" ] } | 21 | static_cell = { version = "2", features = [ "nightly" ] } |
| 22 | perf-client = { path = "../perf-client" } | 22 | perf-client = { path = "../perf-client" } |
| 23 | 23 | ||
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index 44fb7bed6..028ce43ee 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -24,9 +24,9 @@ defmt-rtt = "0.4" | |||
| 24 | cortex-m = { version = "0.7.6" } | 24 | cortex-m = { version = "0.7.6" } |
| 25 | cortex-m-rt = "0.7.0" | 25 | cortex-m-rt = "0.7.0" |
| 26 | embedded-hal = "0.2.6" | 26 | embedded-hal = "0.2.6" |
| 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" } |
| 28 | embedded-hal-async = { version = "=1.0.0-rc.2" } | 28 | embedded-hal-async = { version = "=1.0.0-rc.3" } |
| 29 | embedded-hal-bus = { version = "=0.1.0-rc.2", features = ["async"] } | 29 | embedded-hal-bus = { version = "=0.1.0-rc.3", features = ["async"] } |
| 30 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 30 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 32 | embedded-io-async = { version = "0.6.1" } | 32 | embedded-io-async = { version = "0.6.1" } |
diff --git a/tests/rp/src/bin/gpio.rs b/tests/rp/src/bin/gpio.rs index e0c309887..a57d5d9e8 100644 --- a/tests/rp/src/bin/gpio.rs +++ b/tests/rp/src/bin/gpio.rs | |||
| @@ -16,10 +16,10 @@ async fn main(_spawner: Spawner) { | |||
| 16 | 16 | ||
| 17 | // Test initial output | 17 | // Test initial output |
| 18 | { | 18 | { |
| 19 | let b = Input::new(&mut b, Pull::None); | 19 | let mut b = Input::new(&mut b, Pull::None); |
| 20 | 20 | ||
| 21 | { | 21 | { |
| 22 | let a = Output::new(&mut a, Level::Low); | 22 | let mut a = Output::new(&mut a, Level::Low); |
| 23 | delay(); | 23 | delay(); |
| 24 | assert!(b.is_low()); | 24 | assert!(b.is_low()); |
| 25 | assert!(!b.is_high()); | 25 | assert!(!b.is_high()); |
| @@ -64,7 +64,7 @@ async fn main(_spawner: Spawner) { | |||
| 64 | 64 | ||
| 65 | // Test input no pull | 65 | // Test input no pull |
| 66 | { | 66 | { |
| 67 | let b = Input::new(&mut b, Pull::None); | 67 | let mut b = Input::new(&mut b, Pull::None); |
| 68 | // no pull, the status is undefined | 68 | // no pull, the status is undefined |
| 69 | 69 | ||
| 70 | let mut a = Output::new(&mut a, Level::Low); | 70 | let mut a = Output::new(&mut a, Level::Low); |
| @@ -77,7 +77,7 @@ async fn main(_spawner: Spawner) { | |||
| 77 | 77 | ||
| 78 | // Test input pulldown | 78 | // Test input pulldown |
| 79 | { | 79 | { |
| 80 | let b = Input::new(&mut b, Pull::Down); | 80 | let mut b = Input::new(&mut b, Pull::Down); |
| 81 | delay(); | 81 | delay(); |
| 82 | assert!(b.is_low()); | 82 | assert!(b.is_low()); |
| 83 | 83 | ||
| @@ -91,7 +91,7 @@ async fn main(_spawner: Spawner) { | |||
| 91 | 91 | ||
| 92 | // Test input pullup | 92 | // Test input pullup |
| 93 | { | 93 | { |
| 94 | let b = Input::new(&mut b, Pull::Up); | 94 | let mut b = Input::new(&mut b, Pull::Up); |
| 95 | delay(); | 95 | delay(); |
| 96 | assert!(b.is_high()); | 96 | assert!(b.is_high()); |
| 97 | 97 | ||
diff --git a/tests/rp/src/bin/pwm.rs b/tests/rp/src/bin/pwm.rs index e71d9e610..3fc0bb2a0 100644 --- a/tests/rp/src/bin/pwm.rs +++ b/tests/rp/src/bin/pwm.rs | |||
| @@ -45,7 +45,7 @@ async fn main(_spawner: Spawner) { | |||
| 45 | 45 | ||
| 46 | // Test output from A | 46 | // Test output from A |
| 47 | { | 47 | { |
| 48 | let pin1 = Input::new(&mut p9, Pull::None); | 48 | let mut pin1 = Input::new(&mut p9, Pull::None); |
| 49 | let _pwm = Pwm::new_output_a(&mut p.PWM_CH3, &mut p6, cfg.clone()); | 49 | let _pwm = Pwm::new_output_a(&mut p.PWM_CH3, &mut p6, cfg.clone()); |
| 50 | Timer::after_millis(1).await; | 50 | Timer::after_millis(1).await; |
| 51 | assert_eq!(pin1.is_low(), invert_a); | 51 | assert_eq!(pin1.is_low(), invert_a); |
| @@ -59,7 +59,7 @@ async fn main(_spawner: Spawner) { | |||
| 59 | 59 | ||
| 60 | // Test output from B | 60 | // Test output from B |
| 61 | { | 61 | { |
| 62 | let pin2 = Input::new(&mut p11, Pull::None); | 62 | let mut pin2 = Input::new(&mut p11, Pull::None); |
| 63 | let _pwm = Pwm::new_output_b(&mut p.PWM_CH3, &mut p7, cfg.clone()); | 63 | let _pwm = Pwm::new_output_b(&mut p.PWM_CH3, &mut p7, cfg.clone()); |
| 64 | Timer::after_millis(1).await; | 64 | Timer::after_millis(1).await; |
| 65 | assert_ne!(pin2.is_low(), invert_a); | 65 | assert_ne!(pin2.is_low(), invert_a); |
| @@ -73,8 +73,8 @@ async fn main(_spawner: Spawner) { | |||
| 73 | 73 | ||
| 74 | // Test output from A+B | 74 | // Test output from A+B |
| 75 | { | 75 | { |
| 76 | let pin1 = Input::new(&mut p9, Pull::None); | 76 | let mut pin1 = Input::new(&mut p9, Pull::None); |
| 77 | let pin2 = Input::new(&mut p11, Pull::None); | 77 | let mut pin2 = Input::new(&mut p11, Pull::None); |
| 78 | let _pwm = Pwm::new_output_ab(&mut p.PWM_CH3, &mut p6, &mut p7, cfg.clone()); | 78 | let _pwm = Pwm::new_output_ab(&mut p.PWM_CH3, &mut p6, &mut p7, cfg.clone()); |
| 79 | Timer::after_millis(1).await; | 79 | Timer::after_millis(1).await; |
| 80 | assert_eq!(pin1.is_low(), invert_a); | 80 | assert_eq!(pin1.is_low(), invert_a); |
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" | |||
| 63 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 63 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 64 | cortex-m-rt = "0.7.0" | 64 | cortex-m-rt = "0.7.0" |
| 65 | embedded-hal = "0.2.6" | 65 | embedded-hal = "0.2.6" |
| 66 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } | 66 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" } |
| 67 | embedded-hal-async = { version = "=1.0.0-rc.2" } | 67 | embedded-hal-async = { version = "=1.0.0-rc.3" } |
| 68 | micromath = "2.0.0" | 68 | micromath = "2.0.0" |
| 69 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 69 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 70 | rand_core = { version = "0.6", default-features = false } | 70 | rand_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); |
