diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2022-08-17 18:49:55 +0200 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2022-08-17 22:16:46 +0200 |
commit | fc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch) | |
tree | 545ad829660f6053d29a01da286d03ec3d49f5ca /tests/rp | |
parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
download | embassy-fc6e1e06b305d302d1b7ad17e8ef3a9be986c358.zip |
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'tests/rp')
-rw-r--r-- | tests/rp/src/bin/gpio.rs | 4 | ||||
-rw-r--r-- | tests/rp/src/bin/gpio_async.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/rp/src/bin/gpio.rs b/tests/rp/src/bin/gpio.rs index 6f6baf77..2d1a2ee5 100644 --- a/tests/rp/src/bin/gpio.rs +++ b/tests/rp/src/bin/gpio.rs @@ -5,11 +5,11 @@ use defmt::{assert, *}; use embassy_executor::executor::Spawner; use embassy_rp::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull}; -use embassy_rp::Peripherals; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] -async fn main(_spawner: Spawner, p: Peripherals) { +async fn main(_spawner: Spawner) { + let p = embassy_rp::init(Default::default()); info!("Hello World!"); 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 1098682a..d8878687 100644 --- a/tests/rp/src/bin/gpio_async.rs +++ b/tests/rp/src/bin/gpio_async.rs @@ -6,12 +6,12 @@ use defmt::{assert, *}; use embassy_executor::executor::Spawner; use embassy_executor::time::{Duration, Instant, Timer}; use embassy_rp::gpio::{Input, Level, Output, Pull}; -use embassy_rp::Peripherals; use futures::future::join; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] -async fn main(_spawner: Spawner, p: Peripherals) { +async fn main(_spawner: Spawner) { + let p = embassy_rp::init(Default::default()); info!("embassy-rp gpio_async test"); // On the CI device the following pins are connected with each other. |