aboutsummaryrefslogtreecommitdiff
path: root/macros/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-01-15 23:26:07 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-01-15 23:33:09 +0100
commitdef4fc8079dcb646ef3cab446a4b160e09e169bf (patch)
treec82e6f193e0bf9b842366e305056481d4d1666b2 /macros/src/lib.rs
parent34edc41e9289e83468f68663a7f4a7f0f6cc2797 (diff)
downloadrtic-def4fc8079dcb646ef3cab446a4b160e09e169bf.tar.gz
rtic-def4fc8079dcb646ef3cab446a4b160e09e169bf.tar.zst
rtic-def4fc8079dcb646ef3cab446a4b160e09e169bf.zip
v0.3.0
Diffstat (limited to 'macros/src/lib.rs')
-rw-r--r--macros/src/lib.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs
index 039c19a7..c45646c2 100644
--- a/macros/src/lib.rs
+++ b/macros/src/lib.rs
@@ -58,7 +58,7 @@ mod trans;
/// ```
///
/// The initial value of a resource can be omitted. This means that the resource will be runtime
-/// initialized.
+/// initialized; these runtime initialized resources are also known as *late resources*.
///
/// If this key is omitted its value defaults to an empty list.
///
@@ -79,6 +79,18 @@ mod trans;
///
/// If the key is omitted its value defaults to `init`.
///
+/// ## `init.resources`
+///
+/// This key is optional. Its value is a set of resources the `init` function *owns*. The resources
+/// in this list must be a subset of the resources listed in the top `resources` key. Note that some
+/// restrictions apply:
+///
+/// - The resources in this list can't be late resources.
+/// - The resources that appear in this list can't appear in other list like `idle.resources` or
+/// `tasks.$TASK.resources`
+///
+/// If this key is omitted its value is assumed to be an empty list.
+///
/// # `idle`
///
/// This key is optional. Its value is a set of key values. All the possible keys are shown below:
@@ -100,9 +112,7 @@ mod trans;
/// ## `idle.resources`
///
/// This key is optional. Its value is a list of resources the `idle` loop has access to. The
-/// resources in this list can refer to the resources listed in the top `resources` key. If the name
-/// doesn't match one of the resources /// listed in the top `resources` key the resource is assumed
-/// to be a peripheral.
+/// resources in this list must be a subset of the resources listed in the top `resources` key.
///
/// If omitted its value defaults to an empty list.
///
@@ -154,9 +164,7 @@ mod trans;
/// ## `tasks.$TASK.resources`
///
/// This key is optional. Its value is a list of resources this task has access to. The resources in
-/// this list can refer to the resources listed in the top `resources` key. If the name doesn't
-/// match one of the resources listed in the top `resources` key the resource is assumed to be a
-/// peripheral.
+/// this list must be a subset of the resources listed in the top `resources` key.
///
/// If omitted its value defaults to an empty list.
#[proc_macro]