diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-12 18:23:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 18:23:24 +0000 |
| commit | 445730756e8d90a4efd6fe82f08fc4842e8c01f1 (patch) | |
| tree | cb2e49651a51df2d9e73e806a371d849c322b792 /examples/resource.rs | |
| parent | 98f0a9610401ec09709dd3dc4bd8b3f0a0c50be6 (diff) | |
| parent | 15bd12916140c99d3d740e7c7fe092a5b0d5f33d (diff) | |
Merge #410
410: resources r=AfoHT a=perlindgren
resources
Co-authored-by: Per Lindgren <per.lindgren@ltu.se>
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 d86d46f..60aa52b 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; |
