mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
cargo fmt
This commit is contained in:
parent
a44ee963ef
commit
91476eea12
@ -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_CH0, 1, 1> = Ppi::new_one_to_one(
|
||||
p.PPI_CH0,
|
||||
btn1.event_in(),
|
||||
trigger0.task(),
|
||||
);
|
||||
let mut ppi1: Ppi<PPI_CH0, 1, 1> = Ppi::new_one_to_one(p.PPI_CH0, btn1.event_in(), trigger0.task());
|
||||
ppi1.enable();
|
||||
|
||||
let mut ppi2: Ppi<PPI_CH1, 1, 1> = Ppi::new_one_to_one(
|
||||
p.PPI_CH1,
|
||||
trigger0.event(),
|
||||
trigger1.task(),
|
||||
);
|
||||
let mut ppi2: Ppi<PPI_CH1, 1, 1> = Ppi::new_one_to_one(p.PPI_CH1, trigger0.event(), trigger1.task());
|
||||
ppi2.enable();
|
||||
|
||||
let mut ppi3: Ppi<PPI_CH2, 1, 1> = Ppi::new_one_to_one(
|
||||
p.PPI_CH2,
|
||||
trigger1.event(),
|
||||
led1.task_out(),
|
||||
);
|
||||
let mut ppi3: Ppi<PPI_CH2, 1, 1> = Ppi::new_one_to_one(p.PPI_CH2, trigger1.event(), led1.task_out());
|
||||
ppi3.enable();
|
||||
|
||||
defmt::info!("Push the button to toggle the LED");
|
||||
|
Loading…
Reference in New Issue
Block a user