diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-06-27 12:46:19 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-27 12:46:19 +0000 |
| commit | c7703ba17c5da3d294544c3a4f451bb7bd04ccfb (patch) | |
| tree | 9136ffa9f1291f38d399176c038bbec931912f32 /examples/boot/application/nrf/src/bin/b.rs | |
| parent | 42bc510effae528e7080ddb6bb8465af1bea6856 (diff) | |
| parent | f1f90b17b5c1c5cb56b6ac7722b5ef91b6cc3f2d (diff) | |
Merge #831
831: Move bootloader main to examples r=lulf a=lulf
This should remove some confusion around embassy-boot-* being a library
vs. a binary. The binary is now an example bootloader instead.
Co-authored-by: Ulf Lilleengen <[email protected]>
Co-authored-by: Ulf Lilleengen <[email protected]>
Diffstat (limited to 'examples/boot/application/nrf/src/bin/b.rs')
| -rw-r--r-- | examples/boot/application/nrf/src/bin/b.rs | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![macro_use] | ||
| 4 | #![feature(generic_associated_types)] | ||
| 5 | #![feature(type_alias_impl_trait)] | ||
| 6 | |||
| 7 | use embassy::time::{Duration, Timer}; | ||
| 8 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; | ||
| 9 | use embassy_nrf::Peripherals; | ||
| 10 | use panic_reset as _; | ||
| 11 | |||
| 12 | #[embassy::main] | ||
| 13 | async fn main(_s: embassy::executor::Spawner, p: Peripherals) { | ||
| 14 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); | ||
| 15 | //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); | ||
| 16 | |||
| 17 | loop { | ||
| 18 | led.set_high(); | ||
| 19 | Timer::after(Duration::from_millis(300)).await; | ||
| 20 | led.set_low(); | ||
| 21 | Timer::after(Duration::from_millis(300)).await; | ||
| 22 | } | ||
| 23 | } | ||
