diff options
| author | Per Lindgren <per.lindgren@ltu.se> | 2023-02-01 21:21:31 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:35:09 +0100 |
| commit | aa6baafa568b08a77a31c17c078a6166d16a2ee9 (patch) | |
| tree | b60d47db3ffd0f9d1bb528d6d6dde09de954ea13 /book/en/src/by-example/tips_static_lifetimes.md | |
| parent | 89632f9b22d33bef08b2f98554e263c8a1d7cfa0 (diff) | |
book remove ramfunc, remove migration
Diffstat (limited to 'book/en/src/by-example/tips_static_lifetimes.md')
| -rw-r--r-- | book/en/src/by-example/tips_static_lifetimes.md | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/book/en/src/by-example/tips_static_lifetimes.md b/book/en/src/by-example/tips_static_lifetimes.md index dadd9c9..0eaa59f 100644 --- a/book/en/src/by-example/tips_static_lifetimes.md +++ b/book/en/src/by-example/tips_static_lifetimes.md @@ -2,23 +2,22 @@ In `#[init]` and `#[idle]` `local` resources have `'static` lifetime. -Useful when pre-allocating and/or splitting resources between tasks, drivers -or some other object. -This comes in handy when drivers, such as USB drivers, need to allocate memory and -when using splittable data structures such as [`heapless::spsc::Queue`]. +Useful when pre-allocating and/or splitting resources between tasks, drivers or some other object. This comes in handy when drivers, such as USB drivers, need to allocate memory and when using splittable data structures such as [`heapless::spsc::Queue`]. -In the following example two different tasks share a [`heapless::spsc::Queue`] -for lock-free access to the shared queue. +In the following example two different tasks share a [`heapless::spsc::Queue`] for lock-free access to the shared queue. [`heapless::spsc::Queue`]: https://docs.rs/heapless/0.7.5/heapless/spsc/struct.Queue.html ``` rust -{{#include ../../../../examples/static.rs}} +{{#include ../../../../rtic/examples/static.rs}} ``` Running this program produces the expected output. ``` console $ cargo run --target thumbv7m-none-eabi --example static -{{#include ../../../../ci/expected/static.run}} +``` + +``` console +{{#include ../../../../rtic/ci/expected/static.run}} ``` |
