diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/Cargo.toml | 5 | ||||
-rw-r--r-- | macros/src/lib.rs | 22 |
2 files changed, 17 insertions, 10 deletions
diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 27bd1f56..254b7bd1 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -7,13 +7,12 @@ keywords = ["arm", "cortex-m"] license = "MIT OR Apache-2.0" name = "cortex-m-rtfm-macros" repository = "https://github.com/japaric/cortex-m-rtfm" -version = "0.2.1" +version = "0.3.0" [dependencies] error-chain = "0.10.0" quote = "0.3.15" -# rtfm-syntax = "0.2.0" -rtfm-syntax = { git = "https://github.com/japaric/rtfm-syntax" } +rtfm-syntax = "0.2.1" syn = "0.11.11" [lib] 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] |