summaryrefslogtreecommitdiff
path: root/examples/boot/nrf
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-06-12 22:15:44 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-06-12 22:22:31 +0200
commita8703b75988e1e700af701116464025679d2feb8 (patch)
treef4ec5de70ec05e793a774049e010935ac45853ed /examples/boot/nrf
parent6199bdea710cde33e5d5381b6d6abfc8af46df19 (diff)
downloadembassy-a8703b75988e1e700af701116464025679d2feb8.zip
Run rustfmt.
Diffstat (limited to 'examples/boot/nrf')
-rw-r--r--examples/boot/nrf/src/bin/a.rs14
-rw-r--r--examples/boot/nrf/src/bin/b.rs7
2 files changed, 6 insertions, 15 deletions
diff --git a/examples/boot/nrf/src/bin/a.rs b/examples/boot/nrf/src/bin/a.rs
index d45d0ff3..0b9715e4 100644
--- a/examples/boot/nrf/src/bin/a.rs
+++ b/examples/boot/nrf/src/bin/a.rs
@@ -6,12 +6,9 @@
use embassy_boot_nrf::FirmwareUpdater;
use embassy_embedded_hal::adapter::BlockingAsync;
-use embassy_nrf::{
- gpio::{Input, Pull},
- gpio::{Level, Output, OutputDrive},
- nvmc::Nvmc,
- Peripherals,
-};
+use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
+use embassy_nrf::nvmc::Nvmc;
+use embassy_nrf::Peripherals;
use panic_reset as _;
static APP_B: &[u8] = include_bytes!("../../b.bin");
@@ -35,10 +32,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) {
for chunk in APP_B.chunks(4096) {
let mut buf: [u8; 4096] = [0; 4096];
buf[..chunk.len()].copy_from_slice(chunk);
- updater
- .write_firmware(offset, &buf, &mut nvmc, 4096)
- .await
- .unwrap();
+ updater.write_firmware(offset, &buf, &mut nvmc, 4096).await.unwrap();
offset += chunk.len();
}
updater.update(&mut nvmc).await.unwrap();
diff --git a/examples/boot/nrf/src/bin/b.rs b/examples/boot/nrf/src/bin/b.rs
index 18bb6330..a06c20f8 100644
--- a/examples/boot/nrf/src/bin/b.rs
+++ b/examples/boot/nrf/src/bin/b.rs
@@ -5,11 +5,8 @@
#![feature(type_alias_impl_trait)]
use embassy::time::{Duration, Timer};
-use embassy_nrf::{
- gpio::{Level, Output, OutputDrive},
- Peripherals,
-};
-
+use embassy_nrf::gpio::{Level, Output, OutputDrive};
+use embassy_nrf::Peripherals;
use panic_reset as _;
#[embassy::main]