aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml1
-rw-r--r--ci/expected/multilock.run4
-rw-r--r--examples/multilock.rs7
3 files changed, 9 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 739c7bd9..e729db67 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -243,6 +243,7 @@ jobs:
resource
lock
+ multilock
late
only-shared-access
diff --git a/ci/expected/multilock.run b/ci/expected/multilock.run
new file mode 100644
index 00000000..10a377c5
--- /dev/null
+++ b/ci/expected/multilock.run
@@ -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
diff --git a/examples/multilock.rs b/examples/multilock.rs
index 99d26ad7..a6985dfa 100644
--- a/examples/multilock.rs
+++ b/examples/multilock.rs
@@ -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;