mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
Move tips into their own subdir
This commit is contained in:
parent
cb0ceea472
commit
e51146a98c
8 changed files with 17 additions and 17 deletions
|
@ -13,13 +13,13 @@
|
||||||
- [Channel based communication](./by-example/channel.md)
|
- [Channel based communication](./by-example/channel.md)
|
||||||
- [Delay and Timeout using Monotonics](./by-example/delay.md)
|
- [Delay and Timeout using Monotonics](./by-example/delay.md)
|
||||||
- [The minimal app](./by-example/app_minimal.md)
|
- [The minimal app](./by-example/app_minimal.md)
|
||||||
- [Tips & Tricks](./by-example/tips.md)
|
- [Tips & Tricks](./by-example/tips/index.md)
|
||||||
- [Implementing Monotonic](./by-example/tips_monotonic_impl.md)
|
- [Implementing Monotonic](./by-example/tips/monotonic_impl.md)
|
||||||
- [Resource de-structure-ing](./by-example/tips_destructureing.md)
|
- [Resource de-structure-ing](./by-example/tips/destructureing.md)
|
||||||
- [Avoid copies when message passing](./by-example/tips_indirection.md)
|
- [Avoid copies when message passing](./by-example/tips/indirection.md)
|
||||||
- [`'static` super-powers](./by-example/tips_static_lifetimes.md)
|
- [`'static` super-powers](./by-example/tips/static_lifetimes.md)
|
||||||
- [Inspecting generated code](./by-example/tips_view_code.md)
|
- [Inspecting generated code](./by-example/tips/view_code.md)
|
||||||
<!-- - [Running tasks from RAM](./by-example/tips_from_ram.md) -->
|
<!-- - [Running tasks from RAM](./by-example/tips/from_ram.md) -->
|
||||||
<!-- - [`#[cfg(..)]` support](./by-example/tips.md) -->
|
<!-- - [`#[cfg(..)]` support](./by-example/tips.md) -->
|
||||||
- [RTIC vs. the world](./rtic_vs.md)
|
- [RTIC vs. the world](./rtic_vs.md)
|
||||||
- [Awesome RTIC examples](./awesome_rtic.md)
|
- [Awesome RTIC examples](./awesome_rtic.md)
|
||||||
|
|
|
@ -4,12 +4,12 @@ Destructuring task resources might help readability if a task takes multiple
|
||||||
resources. Here are two examples on how to split up the resource struct:
|
resources. Here are two examples on how to split up the resource struct:
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
{{#include ../../../../rtic/examples/destructure.rs}}
|
{{#include ../../../../../rtic/examples/destructure.rs}}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
$ cargo run --target thumbv7m-none-eabi --example destructure
|
$ cargo run --target thumbv7m-none-eabi --example destructure
|
||||||
```
|
```
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/destructure.run}}
|
{{#include ../../../../../rtic/ci/expected/destructure.run}}
|
||||||
```
|
```
|
|
@ -12,7 +12,7 @@ improve performance in some cases.
|
||||||
The example below shows how to place the higher priority task, `bar`, in RAM.
|
The example below shows how to place the higher priority task, `bar`, in RAM.
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
{{#include ../../../../rtic/examples/ramfunc.rs}}
|
{{#include ../../../../../rtic/examples/ramfunc.rs}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Running this program produces the expected output.
|
Running this program produces the expected output.
|
||||||
|
@ -22,7 +22,7 @@ $ cargo run --target thumbv7m-none-eabi --example ramfunc
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/ramfunc.run}}
|
{{#include ../../../../../rtic/ci/expected/ramfunc.run}}
|
||||||
```
|
```
|
||||||
|
|
||||||
One can look at the output of `cargo-nm` to confirm that `bar` ended in RAM
|
One can look at the output of `cargo-nm` to confirm that `bar` ended in RAM
|
||||||
|
@ -33,7 +33,7 @@ $ cargo nm --example ramfunc --release | grep ' foo::'
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/ramfunc.run.grep.foo}}
|
{{#include ../../../../../rtic/ci/expected/ramfunc.run.grep.foo}}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
|
@ -41,5 +41,5 @@ $ cargo nm --example ramfunc --target thumbv7m-none-eabi --release | grep '*bar
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/ramfunc.run.grep.bar}}
|
{{#include ../../../../../rtic/ci/expected/ramfunc.run.grep.bar}}
|
||||||
```
|
```
|
|
@ -14,7 +14,7 @@ As this example of approach goes completely outside of RTIC resource model with
|
||||||
Here's an example where `heapless::Pool` is used to "box" buffers of 128 bytes.
|
Here's an example where `heapless::Pool` is used to "box" buffers of 128 bytes.
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
{{#include ../../../../rtic/examples/pool.rs}}
|
{{#include ../../../../../rtic/examples/pool.rs}}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
|
@ -22,5 +22,5 @@ $ cargo run --target thumbv7m-none-eabi --example pool
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/pool.run}}
|
{{#include ../../../../../rtic/ci/expected/pool.run}}
|
||||||
```
|
```
|
|
@ -9,7 +9,7 @@ In the following example two different tasks share a [`heapless::spsc::Queue`] f
|
||||||
[`heapless::spsc::Queue`]: https://docs.rs/heapless/0.7.5/heapless/spsc/struct.Queue.html
|
[`heapless::spsc::Queue`]: https://docs.rs/heapless/0.7.5/heapless/spsc/struct.Queue.html
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
{{#include ../../../../rtic/examples/static.rs}}
|
{{#include ../../../../../rtic/examples/static.rs}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Running this program produces the expected output.
|
Running this program produces the expected output.
|
||||||
|
@ -19,5 +19,5 @@ $ cargo run --target thumbv7m-none-eabi --example static
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
{{#include ../../../../rtic/ci/expected/static.run}}
|
{{#include ../../../../../rtic/ci/expected/static.run}}
|
||||||
```
|
```
|
Loading…
Reference in a new issue