diff options
| author | Ulf Lilleengen <[email protected]> | 2023-01-04 13:35:01 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2023-01-04 13:38:43 +0100 |
| commit | 2332d8cd2396a01fdeaf61dce814da79503c8f70 (patch) | |
| tree | 29973b0546383f536f955f495cfad56265d4d3d4 /examples/boot/application/nrf/src/bin/a.rs | |
| parent | bf4c0de16a119b9e3a42daf76c4bc60face3c2a1 (diff) | |
feat: compile bootloader examples for nRF91
* 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
Diffstat (limited to 'examples/boot/application/nrf/src/bin/a.rs')
| -rw-r--r-- | examples/boot/application/nrf/src/bin/a.rs | 6 |
1 files changed, 6 insertions, 0 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] |
| 17 | async fn main(_spawner: Spawner) { | 17 | async 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 |
