aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example
diff options
context:
space:
mode:
authorHenrik Tjäder <henrik@tjaders.com>2020-10-02 09:33:28 +0000
committerHenrik Tjäder <henrik@tjaders.com>2020-10-02 09:33:28 +0000
commit9ca10b0d8c735a06a3a0a3623a7fc5d09b5e948c (patch)
treeb561ce3896bff52207d424982fec1fe859742a85 /book/en/src/by-example
parent163edd7579222560caf6598cf8071f4201c277c5 (diff)
Add migration to 0.6 along with updated documentation
Diffstat (limited to 'book/en/src/by-example')
-rw-r--r--book/en/src/by-example/resources.md4
-rw-r--r--book/en/src/by-example/tasks.md4
-rw-r--r--book/en/src/by-example/tips.md4
-rw-r--r--book/en/src/by-example/types-send-sync.md2
4 files changed, 7 insertions, 7 deletions
diff --git a/book/en/src/by-example/resources.md b/book/en/src/by-example/resources.md
index b9e92d1..d63d135 100644
--- a/book/en/src/by-example/resources.md
+++ b/book/en/src/by-example/resources.md
@@ -4,11 +4,11 @@ The framework provides an abstraction to share data between any of the contexts
we saw in the previous section (task handlers, `init` and `idle`): resources.
Resources are data visible only to functions declared within the `#[app]`
-pseudo-module. The framework gives the user complete control over which context
+module. The framework gives the user complete control over which context
can access which resource.
All resources are declared as a single `struct` within the `#[app]`
-pseudo-module. Each field in the structure corresponds to a different resource.
+module. Each field in the structure corresponds to a different resource.
Resources can optionally be given an initial value using the `#[init]`
attribute. Resources that are not given an initial value are referred to as
*late* resources and are covered in more detail in a follow-up section in this
diff --git a/book/en/src/by-example/tasks.md b/book/en/src/by-example/tasks.md
index d0b5acb..9fefd02 100644
--- a/book/en/src/by-example/tasks.md
+++ b/book/en/src/by-example/tasks.md
@@ -92,7 +92,7 @@ following snippet:
``` rust
#[rtic::app(..)]
-const APP: () = {
+mod app {
#[init(spawn = [foo, bar])]
fn init(cx: init::Context) {
cx.spawn.foo().unwrap();
@@ -113,5 +113,5 @@ const APP: () = {
fn bar(cx: bar::Context, payload: i32) {
// ..
}
-};
+}
```
diff --git a/book/en/src/by-example/tips.md b/book/en/src/by-example/tips.md
index b191b9d..0b6555e 100644
--- a/book/en/src/by-example/tips.md
+++ b/book/en/src/by-example/tips.md
@@ -139,7 +139,7 @@ $ tail target/rtic-expansion.rs
``` rust
#[doc = r" Implementation details"]
-const APP: () = {
+mod app {
#[doc = r" Always include the device crate which contains the vector table"]
use lm3s6965 as _;
#[no_mangle]
@@ -152,7 +152,7 @@ const APP: () = {
rtic::export::wfi()
}
}
-};
+}
```
Or, you can use the [`cargo-expand`] sub-command. This sub-command will expand
diff --git a/book/en/src/by-example/types-send-sync.md b/book/en/src/by-example/types-send-sync.md
index 41cd9ba..9cdb889 100644
--- a/book/en/src/by-example/types-send-sync.md
+++ b/book/en/src/by-example/types-send-sync.md
@@ -1,6 +1,6 @@
# Types, Send and Sync
-Every function within the `APP` pseudo-module has a `Context` structure as its
+Every function within the `app` module has a `Context` structure as its
first parameter. All the fields of these structures have predictable,
non-anonymous types so you can write plain functions that take them as arguments.