diff options
| author | Dion Dokter <[email protected]> | 2021-10-19 10:27:49 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-10-26 14:47:33 +0200 |
| commit | 4d3341dbb980131762d714cb5b5d8dfb11060119 (patch) | |
| tree | 5088db04f297f0a21b91e8b31bf0adf82818f9f2 /examples/nrf/src/bin | |
| parent | 6205d6da478be0392beaaee27e2f48e8e223a6ca (diff) | |
Fixed examples
Diffstat (limited to 'examples/nrf/src/bin')
| -rw-r--r-- | examples/nrf/src/bin/ppi.rs | 2 | ||||
| -rw-r--r-- | examples/nrf/src/bin/saadc_continuous.rs | 4 |
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; | |||
| 10 | use embassy::executor::Spawner; | 10 | use embassy::executor::Spawner; |
| 11 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; | 11 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; |
| 12 | use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity}; | 12 | use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity}; |
| 13 | use embassy_nrf::interconnect::Ppi; | 13 | use embassy_nrf::ppi::Ppi; |
| 14 | use embassy_nrf::Peripherals; | 14 | use embassy_nrf::Peripherals; |
| 15 | use gpiote::{OutputChannel, OutputChannelPolarity}; | 15 | use 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(); |
