mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-25 21:19:35 +01:00
Added multilock to CI
This commit is contained in:
parent
9cbe639ebf
commit
f111c825ba
3 changed files with 9 additions and 3 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
@ -243,6 +243,7 @@ jobs:
|
|||
|
||||
resource
|
||||
lock
|
||||
multilock
|
||||
late
|
||||
only-shared-access
|
||||
|
||||
|
|
4
ci/expected/multilock.run
Normal file
4
ci/expected/multilock.run
Normal file
|
@ -0,0 +1,4 @@
|
|||
Multiple single locks
|
||||
Multiple single locks, s1: 1, s2: 1, s3: 1
|
||||
Multilock!
|
||||
Multiple single locks, s1: 2, s2: 2, s3: 2
|
|
@ -9,9 +9,10 @@
|
|||
|
||||
use panic_semihosting as _;
|
||||
|
||||
#[rtic::app(device = lm3s6965, dispatchers = [GPIOA])]
|
||||
#[rtic::app(device = lm3s6965)]
|
||||
mod app {
|
||||
use cortex_m_semihosting::{debug, hprintln};
|
||||
use lm3s6965::Interrupt;
|
||||
|
||||
#[resources]
|
||||
struct Resources {
|
||||
|
@ -25,13 +26,13 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(_: init::Context) -> init::LateResources {
|
||||
locks::spawn().ok();
|
||||
rtic::pend(Interrupt::GPIOA);
|
||||
|
||||
init::LateResources {}
|
||||
}
|
||||
|
||||
// when omitted priority is assumed to be `1`
|
||||
#[task(resources = [shared1, shared2, shared3])]
|
||||
#[task(binds = GPIOA, resources = [shared1, shared2, shared3])]
|
||||
fn locks(c: locks::Context) {
|
||||
let mut s1 = c.resources.shared1;
|
||||
let mut s2 = c.resources.shared2;
|
||||
|
|
Loading…
Reference in a new issue