aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/src/bin')
-rw-r--r--examples/nrf/src/bin/shared_bus.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/nrf/src/bin/shared_bus.rs b/examples/nrf/src/bin/shared_bus.rs
new file mode 100644
index 000000000..23d16f796
--- /dev/null
+++ b/examples/nrf/src/bin/shared_bus.rs
@@ -0,0 +1,21 @@
1#![no_std]
2#![no_main]
3#![feature(type_alias_impl_trait)]
4
5use embassy::executor::Spawner;
6use embassy::time::{Duration, Timer};
7use embassy_nrf::gpio::{Level, Output, OutputDrive};
8use embassy_nrf::Peripherals;
9use {defmt_rtt as _, panic_probe as _};
10
11#[embassy::main]
12async fn main(_spawner: Spawner, p: Peripherals) {
13 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard);
14
15 loop {
16 led.set_high();
17 Timer::after(Duration::from_millis(300)).await;
18 led.set_low();
19 Timer::after(Duration::from_millis(300)).await;
20 }
21}