diff --git a/examples/nrf52840/src/bin/egu.rs b/examples/nrf52840/src/bin/egu.rs index df96f7e56..8bf712697 100644 --- a/examples/nrf52840/src/bin/egu.rs +++ b/examples/nrf52840/src/bin/egu.rs @@ -5,11 +5,11 @@ #![no_main] use embassy_executor::Spawner; +use embassy_nrf::egu::{Egu, TriggerNumber}; use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity, OutputChannel, OutputChannelPolarity}; use embassy_nrf::peripherals::{PPI_CH0, PPI_CH1, PPI_CH2}; use embassy_nrf::ppi::Ppi; -use embassy_nrf::egu::{Egu, TriggerNumber}; use embassy_time::{Duration, Timer}; use {defmt_rtt as _, panic_probe as _}; @@ -27,25 +27,13 @@ async fn main(_spawner: Spawner) { let trigger0 = egu1.trigger(TriggerNumber::Trigger0); let trigger1 = egu1.trigger(TriggerNumber::Trigger1); - let mut ppi1: Ppi = Ppi::new_one_to_one( - p.PPI_CH0, - btn1.event_in(), - trigger0.task(), - ); + let mut ppi1: Ppi = Ppi::new_one_to_one(p.PPI_CH0, btn1.event_in(), trigger0.task()); ppi1.enable(); - let mut ppi2: Ppi = Ppi::new_one_to_one( - p.PPI_CH1, - trigger0.event(), - trigger1.task(), - ); + let mut ppi2: Ppi = Ppi::new_one_to_one(p.PPI_CH1, trigger0.event(), trigger1.task()); ppi2.enable(); - let mut ppi3: Ppi = Ppi::new_one_to_one( - p.PPI_CH2, - trigger1.event(), - led1.task_out(), - ); + let mut ppi3: Ppi = Ppi::new_one_to_one(p.PPI_CH2, trigger1.event(), led1.task_out()); ppi3.enable(); defmt::info!("Push the button to toggle the LED");