aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/application/nrf/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-01-05 14:06:45 +0000
committerGitHub <[email protected]>2023-01-05 14:06:45 +0000
commit3fbedd7c0953cab5f14433da6b9b1e2ff5d76939 (patch)
tree551b82f8d3ae2bed72507219811cec6e5b9d22f3 /examples/boot/application/nrf/src
parent3c537a9fae5ed808a2efcc02a11cfdb8eebe0c6c (diff)
parent2332d8cd2396a01fdeaf61dce814da79503c8f70 (diff)
Merge #1141
1141: feat: compile bootloader examples for nRF91 r=lulf a=lulf * Add nRF91 as target in CI builds * Add example linker scripts for nrf91 * Make less nRF52 assumptions example config * Add llvm-tools-preview required for cargo objcopy example Co-authored-by: Ulf Lilleengen <[email protected]>
Diffstat (limited to 'examples/boot/application/nrf/src')
-rw-r--r--examples/boot/application/nrf/src/bin/a.rs6
-rw-r--r--examples/boot/application/nrf/src/bin/b.rs5
2 files changed, 10 insertions, 1 deletions
diff --git a/examples/boot/application/nrf/src/bin/a.rs b/examples/boot/application/nrf/src/bin/a.rs
index 83191f388..090a05b23 100644
--- a/examples/boot/application/nrf/src/bin/a.rs
+++ b/examples/boot/application/nrf/src/bin/a.rs
@@ -16,11 +16,17 @@ static APP_B: &[u8] = include_bytes!("../../b.bin");
16#[embassy_executor::main] 16#[embassy_executor::main]
17async fn main(_spawner: Spawner) { 17async fn main(_spawner: Spawner) {
18 let p = embassy_nrf::init(Default::default()); 18 let p = embassy_nrf::init(Default::default());
19
19 let mut button = Input::new(p.P0_11, Pull::Up); 20 let mut button = Input::new(p.P0_11, Pull::Up);
20 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); 21 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard);
22
21 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); 23 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard);
22 //let mut button = Input::new(p.P1_02, Pull::Up); 24 //let mut button = Input::new(p.P1_02, Pull::Up);
23 25
26 // nRF91 DK
27 // let mut led = Output::new(p.P0_02, Level::Low, OutputDrive::Standard);
28 // let mut button = Input::new(p.P0_06, Pull::Up);
29
24 // The following code block illustrates how to obtain a watchdog that is configured 30 // The following code block illustrates how to obtain a watchdog that is configured
25 // as per the existing watchdog. Ordinarily, we'd use the handle returned to "pet" the 31 // as per the existing watchdog. Ordinarily, we'd use the handle returned to "pet" the
26 // watchdog periodically. If we don't, and we're not going to for this example, then 32 // watchdog periodically. If we don't, and we're not going to for this example, then
diff --git a/examples/boot/application/nrf/src/bin/b.rs b/examples/boot/application/nrf/src/bin/b.rs
index 1373f277d..15ebce5fa 100644
--- a/examples/boot/application/nrf/src/bin/b.rs
+++ b/examples/boot/application/nrf/src/bin/b.rs
@@ -12,7 +12,10 @@ use panic_reset as _;
12async fn main(_spawner: Spawner) { 12async fn main(_spawner: Spawner) {
13 let p = embassy_nrf::init(Default::default()); 13 let p = embassy_nrf::init(Default::default());
14 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); 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); 15 // let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard);
16
17 // nRF91 DK
18 // let mut led = Output::new(p.P0_02, Level::Low, OutputDrive::Standard);
16 19
17 loop { 20 loop {
18 led.set_high(); 21 led.set_high();