Skip to content

Commit 89d9b46

Browse files
committed
Cleanup example
1 parent 9ba2bc8 commit 89d9b46

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

examples/embassy-stm32g4/src/bin/spawn_local.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,16 @@ mod app {
1616
#[shared]
1717
struct Shared {}
1818

19-
// Local resources go here
2019
#[local]
2120
struct Local {}
2221

2322
#[init]
2423
fn init(_cx: init::Context) -> (Shared, Local) {
2524
task1::spawn().ok();
26-
//task2::spawn(Default::default()).ok(); <--- This is rejected
25+
//task2::spawn(Default::default()).ok(); <--- This is rejected since it is a local task
2726
(Shared {}, Local {})
2827
}
2928

30-
// Optional idle, can be removed if not needed.
31-
#[idle]
32-
fn idle(_: idle::Context) -> ! {
33-
defmt::info!("idle");
34-
35-
loop {
36-
continue;
37-
}
38-
}
39-
40-
// TODO: Add tasks
4129
#[task(priority = 1)]
4230
async fn task1(cx: task1::Context) {
4331
defmt::info!("Hello from task1!");

0 commit comments

Comments
 (0)