diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-05-12 01:57:01 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-05-17 00:57:37 +0200 |
| commit | 0310e4d458b86df31f1765104eb3aa9a6ee09bfc (patch) | |
| tree | aca167ae6e37442cafc932b3c729e37082d23b04 /embassy-nrf-examples/src/bin/timer.rs | |
| parent | bfc7f52e6dd7b5ad12fa1f09483fa60f2732ae0c (diff) | |
Add `init` fn. Initializes hw and returns Peripherals.
Diffstat (limited to 'embassy-nrf-examples/src/bin/timer.rs')
| -rw-r--r-- | embassy-nrf-examples/src/bin/timer.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/embassy-nrf-examples/src/bin/timer.rs b/embassy-nrf-examples/src/bin/timer.rs index a2b717bc1..ffbbb7841 100644 --- a/embassy-nrf-examples/src/bin/timer.rs +++ b/embassy-nrf-examples/src/bin/timer.rs | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #[path = "../example_common.rs"] | 8 | #[path = "../example_common.rs"] |
| 9 | mod example_common; | 9 | mod example_common; |
| 10 | use embassy_nrf::Peripherals; | ||
| 10 | use example_common::*; | 11 | use example_common::*; |
| 11 | 12 | ||
| 12 | use defmt::panic; | 13 | use defmt::panic; |
| @@ -30,7 +31,7 @@ async fn run2() { | |||
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | #[embassy::main] | 33 | #[embassy::main] |
| 33 | async fn main(spawner: Spawner) { | 34 | async fn main(spawner: Spawner, p: Peripherals) { |
| 34 | unwrap!(spawner.spawn(run1())); | 35 | unwrap!(spawner.spawn(run1())); |
| 35 | unwrap!(spawner.spawn(run2())); | 36 | unwrap!(spawner.spawn(run2())); |
| 36 | } | 37 | } |
