summaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/ppi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/src/bin/ppi.rs')
-rw-r--r--examples/nrf/src/bin/ppi.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/nrf/src/bin/ppi.rs b/examples/nrf/src/bin/ppi.rs
index 3c9a8148..004a1bfa 100644
--- a/examples/nrf/src/bin/ppi.rs
+++ b/examples/nrf/src/bin/ppi.rs
@@ -3,6 +3,7 @@
#![feature(type_alias_impl_trait)]
use core::future::pending;
+
use defmt::info;
use embassy::executor::Spawner;
use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
@@ -10,9 +11,7 @@ use embassy_nrf::gpiote::{self, InputChannel, InputChannelPolarity};
use embassy_nrf::ppi::Ppi;
use embassy_nrf::Peripherals;
use gpiote::{OutputChannel, OutputChannelPolarity};
-
-use defmt_rtt as _; // global logger
-use panic_probe as _;
+use {defmt_rtt as _, panic_probe as _};
#[embassy::main]
async fn main(_spawner: Spawner, p: Peripherals) {
@@ -60,12 +59,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
let mut ppi = Ppi::new_one_to_one(p.PPI_CH2, button3.event_in(), led1.task_set());
ppi.enable();
- let mut ppi = Ppi::new_one_to_two(
- p.PPI_CH3,
- button4.event_in(),
- led1.task_out(),
- led2.task_out(),
- );
+ let mut ppi = Ppi::new_one_to_two(p.PPI_CH3, button4.event_in(), led1.task_out(), led2.task_out());
ppi.enable();
info!("PPI setup!");