diff --git a/examples/nrf/src/bin/ppi.rs b/examples/nrf/src/bin/ppi.rs index 4edb5d7c0..99246eeda 100644 --- a/examples/nrf/src/bin/ppi.rs +++ b/examples/nrf/src/bin/ppi.rs @@ -10,7 +10,7 @@ use core::future::pending; use embassy::executor::Spawner; use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity}; -use embassy_nrf::interconnect::Ppi; +use embassy_nrf::ppi::Ppi; use embassy_nrf::Peripherals; use gpiote::{OutputChannel, OutputChannelPolarity}; diff --git a/examples/nrf/src/bin/saadc_continuous.rs b/examples/nrf/src/bin/saadc_continuous.rs index 149b9c60c..a06a01e91 100644 --- a/examples/nrf/src/bin/saadc_continuous.rs +++ b/examples/nrf/src/bin/saadc_continuous.rs @@ -32,9 +32,7 @@ async fn main(_spawner: Spawner, mut p: Peripherals) { timer.cc(0).write(100); // We want to sample at 10KHz timer.cc(0).short_compare_clear(); - let mut ppi = Ppi::new(p.PPI_CH0); - ppi.set_event(timer.cc(0).event_compare()); - ppi.set_task(saadc.task_sample()); + let mut ppi = Ppi::new_one_to_one(p.PPI_CH0, timer.cc(0).event_compare(), saadc.task_sample()); ppi.enable(); timer.start();