mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-25 21:19:35 +01:00
examples/multiloc fixed
This commit is contained in:
parent
76595b7aed
commit
569a761122
3 changed files with 3 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
use panic_semihosting as _;
|
use panic_semihosting as _;
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ mod app {
|
||||||
struct Local {}
|
struct Local {}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(_: init::Context) -> (Shared, Local) {
|
||||||
locks::spawn().unwrap();
|
locks::spawn().unwrap();
|
||||||
|
|
||||||
(
|
(
|
||||||
|
@ -32,13 +33,12 @@ mod app {
|
||||||
shared3: 0,
|
shared3: 0,
|
||||||
},
|
},
|
||||||
Local {},
|
Local {},
|
||||||
init::Monotonics(),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// when omitted priority is assumed to be `1`
|
// when omitted priority is assumed to be `1`
|
||||||
#[task(shared = [shared1, shared2, shared3])]
|
#[task(shared = [shared1, shared2, shared3])]
|
||||||
fn locks(c: locks::Context) {
|
async fn locks(c: locks::Context) {
|
||||||
let s1 = c.shared.shared1;
|
let s1 = c.shared.shared1;
|
||||||
let s2 = c.shared.shared2;
|
let s2 = c.shared.shared2;
|
||||||
let s3 = c.shared.shared3;
|
let s3 = c.shared.shared3;
|
||||||
|
|
Loading…
Reference in a new issue