diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /tests/rp/src/bin/gpio_multicore.rs | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'tests/rp/src/bin/gpio_multicore.rs')
| -rw-r--r-- | tests/rp/src/bin/gpio_multicore.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/rp/src/bin/gpio_multicore.rs b/tests/rp/src/bin/gpio_multicore.rs index 3caa8ef35..857f36975 100644 --- a/tests/rp/src/bin/gpio_multicore.rs +++ b/tests/rp/src/bin/gpio_multicore.rs | |||
| @@ -10,6 +10,7 @@ use embassy_executor::Executor; | |||
| 10 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 10 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 11 | use embassy_rp::multicore::{spawn_core1, Stack}; | 11 | use embassy_rp::multicore::{spawn_core1, Stack}; |
| 12 | use embassy_rp::peripherals::{PIN_0, PIN_1}; | 12 | use embassy_rp::peripherals::{PIN_0, PIN_1}; |
| 13 | use embassy_rp::Peri; | ||
| 13 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 14 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 14 | use embassy_sync::channel::Channel; | 15 | use embassy_sync::channel::Channel; |
| 15 | use static_cell::StaticCell; | 16 | use static_cell::StaticCell; |
| @@ -37,7 +38,7 @@ fn main() -> ! { | |||
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | #[embassy_executor::task] | 40 | #[embassy_executor::task] |
| 40 | async fn core0_task(p: PIN_0) { | 41 | async fn core0_task(p: Peri<'static, PIN_0>) { |
| 41 | info!("CORE0 is running"); | 42 | info!("CORE0 is running"); |
| 42 | 43 | ||
| 43 | let mut pin = Output::new(p, Level::Low); | 44 | let mut pin = Output::new(p, Level::Low); |
| @@ -54,7 +55,7 @@ async fn core0_task(p: PIN_0) { | |||
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | #[embassy_executor::task] | 57 | #[embassy_executor::task] |
| 57 | async fn core1_task(p: PIN_1) { | 58 | async fn core1_task(p: Peri<'static, PIN_1>) { |
| 58 | info!("CORE1 is running"); | 59 | info!("CORE1 is running"); |
| 59 | 60 | ||
| 60 | CHANNEL0.receive().await; | 61 | CHANNEL0.receive().await; |
