From 776be79f7bb10b09e795e2ea93bb795a653c9b4c Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Fri, 24 Jun 2022 19:56:15 +0200 Subject: Move bootloader main to examples This should remove some confusion around embassy-boot-* being a library vs. a binary. The binary is now an example bootloader instead. --- examples/boot/application/nrf/src/bin/b.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/boot/application/nrf/src/bin/b.rs (limited to 'examples/boot/application/nrf/src/bin/b.rs') diff --git a/examples/boot/application/nrf/src/bin/b.rs b/examples/boot/application/nrf/src/bin/b.rs new file mode 100644 index 000000000..a06c20f8b --- /dev/null +++ b/examples/boot/application/nrf/src/bin/b.rs @@ -0,0 +1,23 @@ +#![no_std] +#![no_main] +#![macro_use] +#![feature(generic_associated_types)] +#![feature(type_alias_impl_trait)] + +use embassy::time::{Duration, Timer}; +use embassy_nrf::gpio::{Level, Output, OutputDrive}; +use embassy_nrf::Peripherals; +use panic_reset as _; + +#[embassy::main] +async fn main(_s: embassy::executor::Spawner, p: Peripherals) { + let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); + //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); + + loop { + led.set_high(); + Timer::after(Duration::from_millis(300)).await; + led.set_low(); + Timer::after(Duration::from_millis(300)).await; + } +} -- cgit