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/stm32 | |
| parent | 9c9b7b1a66dc90a9183886867811d2db57df714c (diff) | |
| parent | aefa5275a2ab2cac6caef599e7adb76ce1beeddd (diff) | |
Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-rp/dma
Diffstat (limited to 'tests/stm32')
| -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 |
7 files changed, 28 insertions, 27 deletions
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")] |
