diff options
author | 2020-11-12 18:55:11 +0100 | |
---|---|---|
committer | 2020-11-12 18:55:11 +0100 | |
commit | 0cb7cb0ba81d2918ebc8c9d36f8ccc447b365889 (patch) | |
tree | aca7803720a28f0a5fbe8156ab57180ccb81a96b /examples/resource.rs | |
parent | 91ea1e428bb92a907ccfe931102625a20d3628c6 (diff) | |
download | rtic-0cb7cb0ba81d2918ebc8c9d36f8ccc447b365889.tar.gz rtic-0cb7cb0ba81d2918ebc8c9d36f8ccc447b365889.tar.zst rtic-0cb7cb0ba81d2918ebc8c9d36f8ccc447b365889.zip |
resources
Diffstat (limited to 'examples/resource.rs')
-rw-r--r-- | examples/resource.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/resource.rs b/examples/resource.rs index d86d46fb..60aa52b0 100644 --- a/examples/resource.rs +++ b/examples/resource.rs @@ -41,6 +41,7 @@ mod app { } // `shared` can be accessed from this context + // defaults to priority 1 #[task(binds = UART0, resources = [shared])] fn uart0(mut cx: uart0::Context) { let shared = cx.resources.shared.lock(|shared| { @@ -52,7 +53,8 @@ mod app { } // `shared` can be accessed from this context - #[task(binds = UART1, resources = [shared])] + // explicitly set to priority 2 + #[task(binds = UART1, resources = [shared], priority = 2)] fn uart1(mut cx: uart1::Context) { let shared = cx.resources.shared.lock(|shared| { *shared += 1; |