Fixed examples

This commit is contained in:
Dion Dokter 2021-10-19 10:27:49 +02:00 committed by Dario Nieuwenhuis
parent 6205d6da47
commit 4d3341dbb9
2 changed files with 2 additions and 4 deletions

View File

@ -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};

View File

@ -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();