diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-02-10 00:03:49 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-02-18 18:14:57 +0100 |
| commit | 52dfefb63242ad49fd126470042411f464fe624d (patch) | |
| tree | 69c559a4b4ecbab92e8b2963d8331546862d7de4 /examples/rp | |
| parent | dcf0868dd017c6df0c82e504864956374019f484 (diff) | |
rp/pio: update pio-rs crate, reexport it so users don't get version mismatches.
Diffstat (limited to 'examples/rp')
| -rw-r--r-- | examples/rp/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/pio_async.rs | 7 | ||||
| -rw-r--r-- | examples/rp/src/bin/pio_dma.rs | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index e05c88a9a..a81166067 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -55,8 +55,6 @@ embedded-storage = { version = "0.3" } | |||
| 55 | static_cell = "2.1" | 55 | static_cell = "2.1" |
| 56 | portable-atomic = { version = "1.5", features = ["critical-section"] } | 56 | portable-atomic = { version = "1.5", features = ["critical-section"] } |
| 57 | log = "0.4" | 57 | log = "0.4" |
| 58 | pio-proc = { git = "https://github.com/rp-rs/pio-rs", rev = "fa586448b0b223217eec8c92c19fe6823dd04cc4" } | ||
| 59 | pio = { git = "https://github.com/rp-rs/pio-rs", rev = "fa586448b0b223217eec8c92c19fe6823dd04cc4" } | ||
| 60 | rand = { version = "0.8.5", default-features = false } | 58 | rand = { version = "0.8.5", default-features = false } |
| 61 | embedded-sdmmc = "0.7.0" | 59 | embedded-sdmmc = "0.7.0" |
| 62 | 60 | ||
diff --git a/examples/rp/src/bin/pio_async.rs b/examples/rp/src/bin/pio_async.rs index ee248591b..08c702347 100644 --- a/examples/rp/src/bin/pio_async.rs +++ b/examples/rp/src/bin/pio_async.rs | |||
| @@ -6,6 +6,7 @@ use defmt::info; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_rp::bind_interrupts; | 7 | use embassy_rp::bind_interrupts; |
| 8 | use embassy_rp::peripherals::PIO0; | 8 | use embassy_rp::peripherals::PIO0; |
| 9 | use embassy_rp::pio::program::pio_asm; | ||
| 9 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; | 10 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; |
| 10 | use fixed::traits::ToFixed; | 11 | use fixed::traits::ToFixed; |
| 11 | use fixed_macro::types::U56F8; | 12 | use fixed_macro::types::U56F8; |
| @@ -19,7 +20,7 @@ fn setup_pio_task_sm0<'a>(pio: &mut Common<'a, PIO0>, sm: &mut StateMachine<'a, | |||
| 19 | // Setup sm0 | 20 | // Setup sm0 |
| 20 | 21 | ||
| 21 | // Send data serially to pin | 22 | // Send data serially to pin |
| 22 | let prg = pio_proc::pio_asm!( | 23 | let prg = pio_asm!( |
| 23 | ".origin 16", | 24 | ".origin 16", |
| 24 | "set pindirs, 1", | 25 | "set pindirs, 1", |
| 25 | ".wrap_target", | 26 | ".wrap_target", |
| @@ -53,7 +54,7 @@ fn setup_pio_task_sm1<'a>(pio: &mut Common<'a, PIO0>, sm: &mut StateMachine<'a, | |||
| 53 | // Setupm sm1 | 54 | // Setupm sm1 |
| 54 | 55 | ||
| 55 | // Read 0b10101 repeatedly until ISR is full | 56 | // Read 0b10101 repeatedly until ISR is full |
| 56 | let prg = pio_proc::pio_asm!( | 57 | let prg = pio_asm!( |
| 57 | // | 58 | // |
| 58 | ".origin 8", | 59 | ".origin 8", |
| 59 | "set x, 0x15", | 60 | "set x, 0x15", |
| @@ -83,7 +84,7 @@ fn setup_pio_task_sm2<'a>(pio: &mut Common<'a, PIO0>, sm: &mut StateMachine<'a, | |||
| 83 | // Setup sm2 | 84 | // Setup sm2 |
| 84 | 85 | ||
| 85 | // Repeatedly trigger IRQ 3 | 86 | // Repeatedly trigger IRQ 3 |
| 86 | let prg = pio_proc::pio_asm!( | 87 | let prg = pio_asm!( |
| 87 | ".origin 0", | 88 | ".origin 0", |
| 88 | ".wrap_target", | 89 | ".wrap_target", |
| 89 | "set x,10", | 90 | "set x,10", |
diff --git a/examples/rp/src/bin/pio_dma.rs b/examples/rp/src/bin/pio_dma.rs index 02700269c..d00ed2142 100644 --- a/examples/rp/src/bin/pio_dma.rs +++ b/examples/rp/src/bin/pio_dma.rs | |||
| @@ -6,6 +6,7 @@ use defmt::info; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_futures::join::join; | 7 | use embassy_futures::join::join; |
| 8 | use embassy_rp::peripherals::PIO0; | 8 | use embassy_rp::peripherals::PIO0; |
| 9 | use embassy_rp::pio::program::pio_asm; | ||
| 9 | use embassy_rp::pio::{Config, InterruptHandler, Pio, ShiftConfig, ShiftDirection}; | 10 | use embassy_rp::pio::{Config, InterruptHandler, Pio, ShiftConfig, ShiftDirection}; |
| 10 | use embassy_rp::{bind_interrupts, Peripheral}; | 11 | use embassy_rp::{bind_interrupts, Peripheral}; |
| 11 | use fixed::traits::ToFixed; | 12 | use fixed::traits::ToFixed; |
| @@ -32,7 +33,7 @@ async fn main(_spawner: Spawner) { | |||
| 32 | .. | 33 | .. |
| 33 | } = Pio::new(pio, Irqs); | 34 | } = Pio::new(pio, Irqs); |
| 34 | 35 | ||
| 35 | let prg = pio_proc::pio_asm!( | 36 | let prg = pio_asm!( |
| 36 | ".origin 0", | 37 | ".origin 0", |
| 37 | "set pindirs,1", | 38 | "set pindirs,1", |
| 38 | ".wrap_target", | 39 | ".wrap_target", |
