aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/resources.md
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-10-05 08:40:19 +0000
committerGravatar GitHub <noreply@github.com> 2020-10-05 08:40:19 +0000
commitdbf9a7f2983fb00aee130305fec0019c12eaef76 (patch)
tree0422a3712af398436cebfa9f8e6ac422de65dde1 /book/en/src/by-example/resources.md
parent04d415c3c6cce7f763decdf02104d827f2e4de7c (diff)
parent95503b6bdff3f392450d1972b0c499b79a9c2092 (diff)
downloadrtic-dbf9a7f2983fb00aee130305fec0019c12eaef76.tar.gz
rtic-dbf9a7f2983fb00aee130305fec0019c12eaef76.tar.zst
rtic-dbf9a7f2983fb00aee130305fec0019c12eaef76.zip
Merge #368
368: Mod over const r=korken89 a=AfoHT Related [RFC](https://github.com/rtic-rs/rfcs/pull/34) Dependent on [rtic-syntax-PR30](https://github.com/rtic-rs/rtic-syntax/pull/30) ~~Currently using my own dev-branch~~ Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
Diffstat (limited to 'book/en/src/by-example/resources.md')
-rw-r--r--book/en/src/by-example/resources.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/book/en/src/by-example/resources.md b/book/en/src/by-example/resources.md
index d67a72ff..d082dfc1 100644
--- a/book/en/src/by-example/resources.md
+++ b/book/en/src/by-example/resources.md
@@ -4,11 +4,13 @@ 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.
+The `struct` must be annotated with the following attribute: `#[resources]`.
+
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