aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/pages/basic_application.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules/ROOT/pages/basic_application.adoc')
-rw-r--r--docs/modules/ROOT/pages/basic_application.adoc13
1 files changed, 0 insertions, 13 deletions
diff --git a/docs/modules/ROOT/pages/basic_application.adoc b/docs/modules/ROOT/pages/basic_application.adoc
index d233d77c1..3f4f16e28 100644
--- a/docs/modules/ROOT/pages/basic_application.adoc
+++ b/docs/modules/ROOT/pages/basic_application.adoc
@@ -48,19 +48,6 @@ The `Spawner` is the way the main application spawns other tasks. The `Periphera
48include::example$basic/src/main.rs[lines="22..-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:
52
53```rust
54fn embassy_config() -> embassy_nrf::config::Config {
55 embassy_nrf::config::Config::default()
56}
57
58#[embassy_executor::main(config = "embassy_config()")]
59async fn main(_spawner: Spawner, p: embassy_nrf::Peripherals) {
60 // ...
61}
62```
63
64What happens when the `blinker` task has been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy::main]` macro. The macro does the following: 51What happens when the `blinker` task has been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy::main]` macro. The macro does the following:
65 52
66. Creates an Embassy Executor 53. Creates an Embassy Executor