- Added _ppi and _dppi to distinguish between the new and the old peripheral.
- Removed ConfigurableChannel and added capacity numbers to the channels - Replaced the PPI api with a new one using the DPPI terminology (publish & subscribe) - Updated all tasks and event registers for DPPI
This commit is contained in:
committed by
Dario Nieuwenhuis
parent
01e5376b25
commit
65628e1f15
@ -52,24 +52,24 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
);
|
||||
|
||||
let mut ppi = Ppi::new(p.PPI_CH0);
|
||||
ppi.set_event(button1.event_in());
|
||||
ppi.set_task(led1.task_out());
|
||||
ppi.publish(button1.event_in()).unwrap();
|
||||
ppi.subscribe(led1.task_out()).unwrap();
|
||||
ppi.enable();
|
||||
|
||||
let mut ppi = Ppi::new(p.PPI_CH1);
|
||||
ppi.set_event(button2.event_in());
|
||||
ppi.set_task(led1.task_clr());
|
||||
ppi.publish(button2.event_in()).unwrap();
|
||||
ppi.subscribe(led1.task_clr()).unwrap();
|
||||
ppi.enable();
|
||||
|
||||
let mut ppi = Ppi::new(p.PPI_CH2);
|
||||
ppi.set_event(button3.event_in());
|
||||
ppi.set_task(led1.task_set());
|
||||
ppi.publish(button3.event_in()).unwrap();
|
||||
ppi.subscribe(led1.task_set()).unwrap();
|
||||
ppi.enable();
|
||||
|
||||
let mut ppi = Ppi::new(p.PPI_CH3);
|
||||
ppi.set_event(button4.event_in());
|
||||
ppi.set_task(led1.task_out());
|
||||
ppi.set_fork_task(led2.task_out());
|
||||
ppi.publish(button4.event_in()).unwrap();
|
||||
ppi.subscribe(led1.task_out()).unwrap();
|
||||
ppi.subscribe(led2.task_out()).unwrap();
|
||||
ppi.enable();
|
||||
|
||||
info!("PPI setup!");
|
||||
|
Reference in New Issue
Block a user