File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
examples/embassy-stm32g4/src/bin Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -16,28 +16,16 @@ mod app {
16
16
#[ shared]
17
17
struct Shared { }
18
18
19
- // Local resources go here
20
19
#[ local]
21
20
struct Local { }
22
21
23
22
#[ init]
24
23
fn init ( _cx : init:: Context ) -> ( Shared , Local ) {
25
24
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
27
26
( Shared { } , Local { } )
28
27
}
29
28
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
41
29
#[ task( priority = 1 ) ]
42
30
async fn task1 ( cx : task1:: Context ) {
43
31
defmt:: info!( "Hello from task1!" ) ;
You can’t perform that action at this time.
0 commit comments