Attribute Macro main
#[main]Available on crate feature
embassy only.Expand description
Creates a new instance of esp_rtos::embassy::Executor and declares an application entry point
spawning the corresponding function body as an async task.
The following restrictions apply:
- The function must accept exactly 1 parameter, an
embassy_executor::Spawnerhandle that it can use to spawn additional tasks. - The function must be declared
async. - The function must not use generics.
- Only a single
maintask may be declared.
ยงExamples
Spawning a task:
#[esp_rtos::main]
async fn main(_s: embassy_executor::Spawner) {
// Function body
}