Attempt to fix certain borrowing rule issues

This commit is contained in:
Cameron 2023-06-30 11:47:20 +02:00
parent c69f2929c0
commit 81cbb0fc32
2 changed files with 6 additions and 2 deletions

View file

@ -352,11 +352,13 @@ impl<'d, U: UarteInstance, T: TimerInstance> BufferedUarte<'d, U, T> {
s.rx_ppi_ch.store(ppi_ch2.number() as u8, Ordering::Relaxed);
let mut ppi_group = PpiGroup::new(ppi_group);
let ppi_group_channel_disable_all_task = ppi_group.task_disable_all();
let mut ppi_ch2 = Ppi::new_one_to_two(
ppi_ch2,
Event::from_reg(&r.events_endrx),
Task::from_reg(&r.tasks_startrx),
ppi_group.task_disable_all(),
ppi_group_channel_disable_all_task
);
ppi_ch2.disable();
ppi_group.add_channel(&ppi_ch2);

View file

@ -320,7 +320,9 @@ impl<'d, const N: usize> Saadc<'d, N> {
timer.cc(0).write(sample_counter);
timer.cc(0).short_compare_clear();
let mut sample_ppi = Ppi::new_one_to_one(ppi_ch2, timer.cc(0).event_compare(), Task::from_reg(&r.tasks_sample));
let compare_event = timer.cc(0).event_compare();
let mut sample_ppi = Ppi::new_one_to_one(ppi_ch2, compare_event, Task::from_reg(&r.tasks_sample));
timer.start();