Fixed examples
This commit is contained in:
parent
6205d6da47
commit
4d3341dbb9
@ -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};
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user