aboutsummaryrefslogtreecommitdiff
path: root/docs/modules
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/ROOT/examples/basic/Cargo.toml5
-rw-r--r--docs/modules/ROOT/examples/basic/src/main.rs7
-rw-r--r--docs/modules/ROOT/pages/basic_application.adoc6
3 files changed, 10 insertions, 8 deletions
diff --git a/docs/modules/ROOT/examples/basic/Cargo.toml b/docs/modules/ROOT/examples/basic/Cargo.toml
index a683a28bf..0f1c30da3 100644
--- a/docs/modules/ROOT/examples/basic/Cargo.toml
+++ b/docs/modules/ROOT/examples/basic/Cargo.toml
@@ -5,9 +5,8 @@ name = "embassy-basic-example"
5version = "0.1.0" 5version = "0.1.0"
6 6
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../../embassy", features = ["defmt"] } 8embassy = { version = "0.1.0", path = "../../../../../embassy", features = ["defmt"] }
9embassy-traits = { version = "0.1.0", path = "../../../../embassy-traits", features = ["defmt"] } 9embassy-nrf = { version = "0.1.0", path = "../../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
10embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
11 10
12defmt = "0.3" 11defmt = "0.3"
13defmt-rtt = "0.3" 12defmt-rtt = "0.3"
diff --git a/docs/modules/ROOT/examples/basic/src/main.rs b/docs/modules/ROOT/examples/basic/src/main.rs
index 0152b40bb..2a9b1facc 100644
--- a/docs/modules/ROOT/examples/basic/src/main.rs
+++ b/docs/modules/ROOT/examples/basic/src/main.rs
@@ -9,8 +9,11 @@ use defmt::*;
9 9
10use embassy::executor::Spawner; 10use embassy::executor::Spawner;
11use embassy::time::{Duration, Timer}; 11use embassy::time::{Duration, Timer};
12use embassy_nrf::gpio::{Level, Output, OutputDrive}; 12use embassy_nrf::{
13use embassy_nrf::Peripherals; 13 gpio::{Level, Output, OutputDrive},
14 peripherals::P0_13,
15 Peripherals,
16};
14use embedded_hal::digital::v2::OutputPin; 17use embedded_hal::digital::v2::OutputPin;
15 18
16#[embassy::task] 19#[embassy::task]
diff --git a/docs/modules/ROOT/pages/basic_application.adoc b/docs/modules/ROOT/pages/basic_application.adoc
index c2849927a..46a375c86 100644
--- a/docs/modules/ROOT/pages/basic_application.adoc
+++ b/docs/modules/ROOT/pages/basic_application.adoc
@@ -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="16..24"] 33include::example$basic/src/main.rs[lines="18..27"]
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="26..30"] 48include::example$basic/src/main.rs[lines="28..-1"]
49---- 49----
50 50
51 51
@@ -64,7 +64,7 @@ The project definition needs to contain the embassy dependencies:
64 64
65[source,toml] 65[source,toml]
66---- 66----
67include::example$basic/Cargo.toml[lines="8..10"] 67include::example$basic/Cargo.toml[lines="8..9"]
68---- 68----
69 69
70Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well). 70Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well).