aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/pages/basic_application.adoc
diff options
context:
space:
mode:
authorJohannes Neyer <[email protected]>2022-11-11 11:06:38 +0100
committerJohannes Neyer <[email protected]>2022-11-15 10:10:33 +0100
commitbcec55464f22069c45f07745efdd0fa45a4959c4 (patch)
tree0f1237fe5cf5542eb911912c6a69f0857531a9c2 /docs/modules/ROOT/pages/basic_application.adoc
parentd05979c7085675c33615700f6590b1543ed69323 (diff)
[doc] Fix line indices of basic example
Diffstat (limited to 'docs/modules/ROOT/pages/basic_application.adoc')
-rw-r--r--docs/modules/ROOT/pages/basic_application.adoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/modules/ROOT/pages/basic_application.adoc b/docs/modules/ROOT/pages/basic_application.adoc
index 4dc4a6359..f20ddf531 100644
--- a/docs/modules/ROOT/pages/basic_application.adoc
+++ b/docs/modules/ROOT/pages/basic_application.adoc
@@ -21,7 +21,7 @@ Then, what follows are some declarations on how to deal with panics and faults.
21 21
22[source,rust] 22[source,rust]
23---- 23----
24include::example$basic/src/main.rs[lines="11..12"] 24include::example$basic/src/main.rs[lines="10"]
25---- 25----
26 26
27=== Task declaration 27=== Task declaration
@@ -30,7 +30,7 @@ After a bit of import declaration, the tasks run by the application should be de
30 30
31[source,rust] 31[source,rust]
32---- 32----
33include::example$basic/src/main.rs[lines="13..22"] 33include::example$basic/src/main.rs[lines="12..20"]
34---- 34----
35 35
36An embassy task must be declared `async`, and may NOT take generic arguments. In this case, we are handed the LED that should be blinked and the interval of the blinking. 36An embassy task must be declared `async`, and may NOT take generic arguments. In this case, we are handed the LED that should be blinked and the interval of the blinking.
@@ -45,7 +45,7 @@ The `Spawner` is the way the main application spawns other tasks. The `Periphera
45 45
46[source,rust] 46[source,rust]
47---- 47----
48include::example$basic/src/main.rs[lines="23..-1"] 48include::example$basic/src/main.rs[lines="22..-1"]
49---- 49----
50 50
51`#[embassy_executor::main]` takes an optional `config` parameter specifying a function that returns an instance of HAL's `Config` struct. For example: 51`#[embassy_executor::main]` takes an optional `config` parameter specifying a function that returns an instance of HAL's `Config` struct. For example:
@@ -76,7 +76,7 @@ The project definition needs to contain the embassy dependencies:
76 76
77[source,toml] 77[source,toml]
78---- 78----
79include::example$basic/Cargo.toml[lines="8..9"] 79include::example$basic/Cargo.toml[lines="9..11"]
80---- 80----
81 81
82Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well). 82Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well).