diff options
| author | Mathias <[email protected]> | 2022-08-18 21:08:57 +0200 |
|---|---|---|
| committer | Mathias <[email protected]> | 2022-08-18 21:08:57 +0200 |
| commit | a7d6bc7ba5faef3d711b944baf6c8e3685fdb37e (patch) | |
| tree | d35085173fb8e4a0ff3b6357e3aaef18c6124e6e /tests | |
| parent | 9c9b7b1a66dc90a9183886867811d2db57df714c (diff) | |
| parent | aefa5275a2ab2cac6caef599e7adb76ce1beeddd (diff) | |
Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-rp/dma
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rp/Cargo.toml | 5 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio.rs | 6 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio_async.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/Cargo.toml | 5 | ||||
| -rw-r--r-- | tests/stm32/src/bin/gpio.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/src/bin/spi.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/src/bin/spi_dma.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/src/bin/timer.rs | 10 | ||||
| -rw-r--r-- | tests/stm32/src/bin/usart.rs | 8 | ||||
| -rw-r--r-- | tests/stm32/src/bin/usart_dma.rs | 8 |
10 files changed, 38 insertions, 36 deletions
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index d19243b9d..8740cc488 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -5,13 +5,14 @@ version = "0.1.0" | |||
| 5 | 5 | ||
| 6 | [dependencies] | 6 | [dependencies] |
| 7 | embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["defmt"] } | 7 | embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["defmt"] } |
| 8 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt"] } | 8 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } |
| 9 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } | ||
| 9 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] } | 10 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] } |
| 10 | 11 | ||
| 11 | defmt = "0.3.0" | 12 | defmt = "0.3.0" |
| 12 | defmt-rtt = "0.3.0" | 13 | defmt-rtt = "0.3.0" |
| 13 | 14 | ||
| 14 | cortex-m = "0.7.3" | 15 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 15 | cortex-m-rt = "0.7.0" | 16 | cortex-m-rt = "0.7.0" |
| 16 | embedded-hal = "0.2.6" | 17 | embedded-hal = "0.2.6" |
| 17 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } | 18 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
diff --git a/tests/rp/src/bin/gpio.rs b/tests/rp/src/bin/gpio.rs index 6f6baf77a..af22fe27d 100644 --- a/tests/rp/src/bin/gpio.rs +++ b/tests/rp/src/bin/gpio.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::{assert, *}; | 5 | use defmt::{assert, *}; |
| 6 | use embassy_executor::executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_rp::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull}; | 7 | use embassy_rp::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull}; |
| 8 | use embassy_rp::Peripherals; | ||
| 9 | use {defmt_rtt as _, panic_probe as _}; | 8 | use {defmt_rtt as _, panic_probe as _}; |
| 10 | 9 | ||
| 11 | #[embassy_executor::main] | 10 | #[embassy_executor::main] |
| 12 | async fn main(_spawner: Spawner, p: Peripherals) { | 11 | async fn main(_spawner: Spawner) { |
| 12 | let p = embassy_rp::init(Default::default()); | ||
| 13 | info!("Hello World!"); | 13 | info!("Hello World!"); |
| 14 | 14 | ||
| 15 | let (mut a, mut b) = (p.PIN_0, p.PIN_1); | 15 | let (mut a, mut b) = (p.PIN_0, p.PIN_1); |
diff --git a/tests/rp/src/bin/gpio_async.rs b/tests/rp/src/bin/gpio_async.rs index 1098682af..1eeaac1f6 100644 --- a/tests/rp/src/bin/gpio_async.rs +++ b/tests/rp/src/bin/gpio_async.rs | |||
| @@ -3,15 +3,15 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::{assert, *}; | 5 | use defmt::{assert, *}; |
| 6 | use embassy_executor::executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_executor::time::{Duration, Instant, Timer}; | ||
| 8 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 7 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 9 | use embassy_rp::Peripherals; | 8 | use embassy_time::{Duration, Instant, Timer}; |
| 10 | use futures::future::join; | 9 | use futures::future::join; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 11 | ||
| 13 | #[embassy_executor::main] | 12 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner) { |
| 14 | let p = embassy_rp::init(Default::default()); | ||
| 15 | info!("embassy-rp gpio_async test"); | 15 | info!("embassy-rp gpio_async test"); |
| 16 | 16 | ||
| 17 | // On the CI device the following pins are connected with each other. | 17 | // On the CI device the following pins are connected with each other. |
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index c1cca99d1..1d12995a2 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -14,13 +14,14 @@ stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board | |||
| 14 | 14 | ||
| 15 | [dependencies] | 15 | [dependencies] |
| 16 | embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["defmt"] } | 16 | embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["defmt"] } |
| 17 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "time-tick-32768hz"] } | 17 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } |
| 18 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-32768hz"] } | ||
| 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } | 19 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } |
| 19 | 20 | ||
| 20 | defmt = "0.3.0" | 21 | defmt = "0.3.0" |
| 21 | defmt-rtt = "0.3.0" | 22 | defmt-rtt = "0.3.0" |
| 22 | 23 | ||
| 23 | cortex-m = "0.7.3" | 24 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 24 | cortex-m-rt = "0.7.0" | 25 | cortex-m-rt = "0.7.0" |
| 25 | embedded-hal = "0.2.6" | 26 | embedded-hal = "0.2.6" |
| 26 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs index 8eab731bf..18fd85d44 100644 --- a/tests/stm32/src/bin/gpio.rs +++ b/tests/stm32/src/bin/gpio.rs | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert; | 7 | use defmt::assert; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull, Speed}; | 9 | use embassy_stm32::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull, Speed}; |
| 10 | use embassy_stm32::Peripherals; | ||
| 11 | use example_common::*; | 10 | use example_common::*; |
| 12 | 11 | ||
| 13 | #[embassy_executor::main(config = "config()")] | 12 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner) { |
| 14 | let p = embassy_stm32::init(config()); | ||
| 15 | info!("Hello World!"); | 15 | info!("Hello World!"); |
| 16 | 16 | ||
| 17 | // Arduino pins D0 and D1 | 17 | // Arduino pins D0 and D1 |
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs index 6d38b0bbf..1c5dc87c0 100644 --- a/tests/stm32/src/bin/spi.rs +++ b/tests/stm32/src/bin/spi.rs | |||
| @@ -5,15 +5,15 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert_eq; | 7 | use defmt::assert_eq; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::dma::NoDma; | 9 | use embassy_stm32::dma::NoDma; |
| 10 | use embassy_stm32::spi::{self, Spi}; | 10 | use embassy_stm32::spi::{self, Spi}; |
| 11 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| 12 | use embassy_stm32::Peripherals; | ||
| 13 | use example_common::*; | 12 | use example_common::*; |
| 14 | 13 | ||
| 15 | #[embassy_executor::main(config = "config()")] | 14 | #[embassy_executor::main] |
| 16 | async fn main(_spawner: Spawner, p: Peripherals) { | 15 | async fn main(_spawner: Spawner) { |
| 16 | let p = embassy_stm32::init(config()); | ||
| 17 | info!("Hello World!"); | 17 | info!("Hello World!"); |
| 18 | 18 | ||
| 19 | #[cfg(feature = "stm32f103c8")] | 19 | #[cfg(feature = "stm32f103c8")] |
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs index 8147c5f08..cb2152e0b 100644 --- a/tests/stm32/src/bin/spi_dma.rs +++ b/tests/stm32/src/bin/spi_dma.rs | |||
| @@ -5,14 +5,14 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert_eq; | 7 | use defmt::assert_eq; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::spi::{self, Spi}; | 9 | use embassy_stm32::spi::{self, Spi}; |
| 10 | use embassy_stm32::time::Hertz; | 10 | use embassy_stm32::time::Hertz; |
| 11 | use embassy_stm32::Peripherals; | ||
| 12 | use example_common::*; | 11 | use example_common::*; |
| 13 | 12 | ||
| 14 | #[embassy_executor::main(config = "config()")] | 13 | #[embassy_executor::main] |
| 15 | async fn main(_spawner: Spawner, p: Peripherals) { | 14 | async fn main(_spawner: Spawner) { |
| 15 | let p = embassy_stm32::init(config()); | ||
| 16 | info!("Hello World!"); | 16 | info!("Hello World!"); |
| 17 | 17 | ||
| 18 | #[cfg(feature = "stm32f103c8")] | 18 | #[cfg(feature = "stm32f103c8")] |
diff --git a/tests/stm32/src/bin/timer.rs b/tests/stm32/src/bin/timer.rs index 76b07ca15..e00e43bf1 100644 --- a/tests/stm32/src/bin/timer.rs +++ b/tests/stm32/src/bin/timer.rs | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert; | 7 | use defmt::assert; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_executor::time::{Duration, Instant, Timer}; | 9 | use embassy_time::{Duration, Instant, Timer}; |
| 10 | use embassy_stm32::Peripherals; | ||
| 11 | use example_common::*; | 10 | use example_common::*; |
| 12 | 11 | ||
| 13 | #[embassy_executor::main(config = "config()")] | 12 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner, _p: Peripherals) { | 13 | async fn main(_spawner: Spawner) { |
| 14 | let _p = embassy_stm32::init(config()); | ||
| 15 | info!("Hello World!"); | 15 | info!("Hello World!"); |
| 16 | 16 | ||
| 17 | let start = Instant::now(); | 17 | let start = Instant::now(); |
diff --git a/tests/stm32/src/bin/usart.rs b/tests/stm32/src/bin/usart.rs index 7b60e4b28..fb4b3fcca 100644 --- a/tests/stm32/src/bin/usart.rs +++ b/tests/stm32/src/bin/usart.rs | |||
| @@ -5,14 +5,14 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert_eq; | 7 | use defmt::assert_eq; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::dma::NoDma; | 9 | use embassy_stm32::dma::NoDma; |
| 10 | use embassy_stm32::usart::{Config, Uart}; | 10 | use embassy_stm32::usart::{Config, Uart}; |
| 11 | use embassy_stm32::Peripherals; | ||
| 12 | use example_common::*; | 11 | use example_common::*; |
| 13 | 12 | ||
| 14 | #[embassy_executor::main(config = "config()")] | 13 | #[embassy_executor::main] |
| 15 | async fn main(_spawner: Spawner, p: Peripherals) { | 14 | async fn main(_spawner: Spawner) { |
| 15 | let p = embassy_stm32::init(config()); | ||
| 16 | info!("Hello World!"); | 16 | info!("Hello World!"); |
| 17 | 17 | ||
| 18 | #[cfg(feature = "stm32wb55rg")] | 18 | #[cfg(feature = "stm32wb55rg")] |
diff --git a/tests/stm32/src/bin/usart_dma.rs b/tests/stm32/src/bin/usart_dma.rs index 323c41cae..09382a022 100644 --- a/tests/stm32/src/bin/usart_dma.rs +++ b/tests/stm32/src/bin/usart_dma.rs | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use defmt::assert_eq; | 7 | use defmt::assert_eq; |
| 8 | use embassy_executor::executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::usart::{Config, Uart}; | 9 | use embassy_stm32::usart::{Config, Uart}; |
| 10 | use embassy_stm32::Peripherals; | ||
| 11 | use example_common::*; | 10 | use example_common::*; |
| 12 | 11 | ||
| 13 | #[embassy_executor::main(config = "config()")] | 12 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner) { |
| 14 | let p = embassy_stm32::init(config()); | ||
| 15 | info!("Hello World!"); | 15 | info!("Hello World!"); |
| 16 | 16 | ||
| 17 | #[cfg(feature = "stm32wb55rg")] | 17 | #[cfg(feature = "stm32wb55rg")] |
