aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin
diff options
context:
space:
mode:
authorDion Dokter <[email protected]>2021-10-19 10:27:49 +0200
committerDario Nieuwenhuis <[email protected]>2021-10-26 14:47:33 +0200
commit4d3341dbb980131762d714cb5b5d8dfb11060119 (patch)
tree5088db04f297f0a21b91e8b31bf0adf82818f9f2 /examples/nrf/src/bin
parent6205d6da478be0392beaaee27e2f48e8e223a6ca (diff)
Fixed examples
Diffstat (limited to 'examples/nrf/src/bin')
-rw-r--r--examples/nrf/src/bin/ppi.rs2
-rw-r--r--examples/nrf/src/bin/saadc_continuous.rs4
2 files changed, 2 insertions, 4 deletions
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;
10use embassy::executor::Spawner; 10use embassy::executor::Spawner;
11use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; 11use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
12use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity}; 12use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity};
13use embassy_nrf::interconnect::Ppi; 13use embassy_nrf::ppi::Ppi;
14use embassy_nrf::Peripherals; 14use embassy_nrf::Peripherals;
15use gpiote::{OutputChannel, OutputChannelPolarity}; 15use gpiote::{OutputChannel, OutputChannelPolarity};
16 16
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) {
32 timer.cc(0).write(100); // We want to sample at 10KHz 32 timer.cc(0).write(100); // We want to sample at 10KHz
33 timer.cc(0).short_compare_clear(); 33 timer.cc(0).short_compare_clear();
34 34
35 let mut ppi = Ppi::new(p.PPI_CH0); 35 let mut ppi = Ppi::new_one_to_one(p.PPI_CH0, timer.cc(0).event_compare(), saadc.task_sample());
36 ppi.set_event(timer.cc(0).event_compare());
37 ppi.set_task(saadc.task_sample());
38 ppi.enable(); 36 ppi.enable();
39 37
40 timer.start(); 38 timer.start();