diff options
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; |