diff options
Diffstat (limited to 'examples/boot/application/nrf')
| -rw-r--r-- | examples/boot/application/nrf/src/bin/a.rs | 5 | ||||
| -rw-r--r-- | examples/boot/application/nrf/src/bin/b.rs | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/examples/boot/application/nrf/src/bin/a.rs b/examples/boot/application/nrf/src/bin/a.rs index 3044645a8..6343f5705 100644 --- a/examples/boot/application/nrf/src/bin/a.rs +++ b/examples/boot/application/nrf/src/bin/a.rs | |||
| @@ -6,15 +6,16 @@ | |||
| 6 | 6 | ||
| 7 | use embassy_boot_nrf::FirmwareUpdater; | 7 | use embassy_boot_nrf::FirmwareUpdater; |
| 8 | use embassy_embedded_hal::adapter::BlockingAsync; | 8 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 9 | use embassy_executor::executor::Spawner; | ||
| 9 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; | 10 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; |
| 10 | use embassy_nrf::nvmc::Nvmc; | 11 | use embassy_nrf::nvmc::Nvmc; |
| 11 | use embassy_nrf::Peripherals; | ||
| 12 | use panic_reset as _; | 12 | use panic_reset as _; |
| 13 | 13 | ||
| 14 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 14 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 15 | 15 | ||
| 16 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
| 17 | async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { | 17 | async fn main(_spawner: Spawner) { |
| 18 | let p = embassy_nrf::init(Default::default()); | ||
| 18 | let mut button = Input::new(p.P0_11, Pull::Up); | 19 | let mut button = Input::new(p.P0_11, Pull::Up); |
| 19 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); | 20 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); |
| 20 | //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); | 21 | //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); |
diff --git a/examples/boot/application/nrf/src/bin/b.rs b/examples/boot/application/nrf/src/bin/b.rs index 2f76d20c6..ad44804af 100644 --- a/examples/boot/application/nrf/src/bin/b.rs +++ b/examples/boot/application/nrf/src/bin/b.rs | |||
| @@ -4,13 +4,14 @@ | |||
| 4 | #![feature(generic_associated_types)] | 4 | #![feature(generic_associated_types)] |
| 5 | #![feature(type_alias_impl_trait)] | 5 | #![feature(type_alias_impl_trait)] |
| 6 | 6 | ||
| 7 | use embassy_executor::executor::Spawner; | ||
| 7 | use embassy_executor::time::{Duration, Timer}; | 8 | use embassy_executor::time::{Duration, Timer}; |
| 8 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; | 9 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; |
| 9 | use embassy_nrf::Peripherals; | ||
| 10 | use panic_reset as _; | 10 | use panic_reset as _; |
| 11 | 11 | ||
| 12 | #[embassy_executor::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner) { |
| 14 | let p = embassy_nrf::init(Default::default()); | ||
| 14 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); | 15 | 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 | //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); |
| 16 | 17 | ||
