diff --git a/book/en/src/SUMMARY.md b/book/en/src/SUMMARY.md index 3e2b9cacf3..ff9cffe7cc 100644 --- a/book/en/src/SUMMARY.md +++ b/book/en/src/SUMMARY.md @@ -13,13 +13,13 @@ - [Channel based communication](./by-example/channel.md) - [Delay and Timeout using Monotonics](./by-example/delay.md) - [The minimal app](./by-example/app_minimal.md) - - [Tips & Tricks](./by-example/tips.md) - - [Implementing Monotonic](./by-example/tips_monotonic_impl.md) - - [Resource de-structure-ing](./by-example/tips_destructureing.md) - - [Avoid copies when message passing](./by-example/tips_indirection.md) - - [`'static` super-powers](./by-example/tips_static_lifetimes.md) - - [Inspecting generated code](./by-example/tips_view_code.md) - + - [Tips & Tricks](./by-example/tips/index.md) + - [Implementing Monotonic](./by-example/tips/monotonic_impl.md) + - [Resource de-structure-ing](./by-example/tips/destructureing.md) + - [Avoid copies when message passing](./by-example/tips/indirection.md) + - [`'static` super-powers](./by-example/tips/static_lifetimes.md) + - [Inspecting generated code](./by-example/tips/view_code.md) + - [RTIC vs. the world](./rtic_vs.md) - [Awesome RTIC examples](./awesome_rtic.md) diff --git a/book/en/src/by-example/tips_destructureing.md b/book/en/src/by-example/tips/destructureing.md similarity index 70% rename from book/en/src/by-example/tips_destructureing.md rename to book/en/src/by-example/tips/destructureing.md index ab27987a56..6e1d796656 100644 --- a/book/en/src/by-example/tips_destructureing.md +++ b/book/en/src/by-example/tips/destructureing.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: ``` rust -{{#include ../../../../rtic/examples/destructure.rs}} +{{#include ../../../../../rtic/examples/destructure.rs}} ``` ``` console $ cargo run --target thumbv7m-none-eabi --example destructure ``` ``` console -{{#include ../../../../rtic/ci/expected/destructure.run}} +{{#include ../../../../../rtic/ci/expected/destructure.run}} ``` diff --git a/book/en/src/by-example/tips_from_ram.md b/book/en/src/by-example/tips/from_ram.md similarity index 85% rename from book/en/src/by-example/tips_from_ram.md rename to book/en/src/by-example/tips/from_ram.md index f6b2173186..7306e12d43 100644 --- a/book/en/src/by-example/tips_from_ram.md +++ b/book/en/src/by-example/tips/from_ram.md @@ -12,7 +12,7 @@ improve performance in some cases. The example below shows how to place the higher priority task, `bar`, in RAM. ``` rust -{{#include ../../../../rtic/examples/ramfunc.rs}} +{{#include ../../../../../rtic/examples/ramfunc.rs}} ``` Running this program produces the expected output. @@ -22,7 +22,7 @@ $ cargo run --target thumbv7m-none-eabi --example ramfunc ``` ``` 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 @@ -33,7 +33,7 @@ $ cargo nm --example ramfunc --release | grep ' foo::' ``` ``` console -{{#include ../../../../rtic/ci/expected/ramfunc.run.grep.foo}} +{{#include ../../../../../rtic/ci/expected/ramfunc.run.grep.foo}} ``` ``` console @@ -41,5 +41,5 @@ $ cargo nm --example ramfunc --target thumbv7m-none-eabi --release | grep '*bar ``` ``` console -{{#include ../../../../rtic/ci/expected/ramfunc.run.grep.bar}} +{{#include ../../../../../rtic/ci/expected/ramfunc.run.grep.bar}} ``` diff --git a/book/en/src/by-example/tips.md b/book/en/src/by-example/tips/index.md similarity index 100% rename from book/en/src/by-example/tips.md rename to book/en/src/by-example/tips/index.md diff --git a/book/en/src/by-example/tips_indirection.md b/book/en/src/by-example/tips/indirection.md similarity index 91% rename from book/en/src/by-example/tips_indirection.md rename to book/en/src/by-example/tips/indirection.md index 0de14a612d..eef0d8e28d 100644 --- a/book/en/src/by-example/tips_indirection.md +++ b/book/en/src/by-example/tips/indirection.md @@ -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. ``` rust -{{#include ../../../../rtic/examples/pool.rs}} +{{#include ../../../../../rtic/examples/pool.rs}} ``` ``` console @@ -22,5 +22,5 @@ $ cargo run --target thumbv7m-none-eabi --example pool ``` ``` console -{{#include ../../../../rtic/ci/expected/pool.run}} +{{#include ../../../../../rtic/ci/expected/pool.run}} ``` diff --git a/book/en/src/by-example/tips_monotonic_impl.md b/book/en/src/by-example/tips/monotonic_impl.md similarity index 100% rename from book/en/src/by-example/tips_monotonic_impl.md rename to book/en/src/by-example/tips/monotonic_impl.md diff --git a/book/en/src/by-example/tips_static_lifetimes.md b/book/en/src/by-example/tips/static_lifetimes.md similarity index 86% rename from book/en/src/by-example/tips_static_lifetimes.md rename to book/en/src/by-example/tips/static_lifetimes.md index 0eaa59f46b..b1fd6063a5 100644 --- a/book/en/src/by-example/tips_static_lifetimes.md +++ b/book/en/src/by-example/tips/static_lifetimes.md @@ -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 ``` rust -{{#include ../../../../rtic/examples/static.rs}} +{{#include ../../../../../rtic/examples/static.rs}} ``` Running this program produces the expected output. @@ -19,5 +19,5 @@ $ cargo run --target thumbv7m-none-eabi --example static ``` ``` console -{{#include ../../../../rtic/ci/expected/static.run}} +{{#include ../../../../../rtic/ci/expected/static.run}} ``` diff --git a/book/en/src/by-example/tips_view_code.md b/book/en/src/by-example/tips/view_code.md similarity index 100% rename from book/en/src/by-example/tips_view_code.md rename to book/en/src/by-example/tips/view_code.md