diff options
Diffstat (limited to 'macros/src/lib.rs')
-rw-r--r-- | macros/src/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index b5803628..e659559e 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -15,8 +15,7 @@ mod tests; /// Attribute used to declare a RTIC application /// -/// This attribute must be applied to a `const` item of type `()`. The `const` item is effectively -/// used as a `mod` item: its value must be a block that contains items commonly found in modules, +/// This attribute must be applied to a module block that contains items commonly found in modules, /// like functions and `static` variables. /// /// The `app` attribute has one mandatory argument: @@ -34,9 +33,9 @@ mod tests; /// - `monotonic = <path>`. This is a path to a zero-sized structure (e.g. `struct Foo;`) that /// implements the `Monotonic` trait. This argument must be provided to use the `schedule` API. /// -/// The items allowed in the block value of the `const` item are specified below: +/// The items allowed in the module block are specified below: /// -/// # 1. `struct Resources` +/// # 1. `#[resources] struct <resource-name>` /// /// This structure contains the declaration of all the resources used by the application. Each field /// in this structure corresponds to a different resource. Each resource may optionally be given an @@ -201,12 +200,12 @@ mod tests; /// /// Attributes can be applied to the functions inside this block. These attributes will be forwarded /// to the interrupt handlers generated by the `app` attribute. + #[proc_macro_attribute] pub fn app(args: TokenStream, input: TokenStream) -> TokenStream { let mut settings = Settings::default(); settings.optimize_priorities = true; settings.parse_binds = true; - settings.parse_cores = cfg!(feature = "heterogeneous") || cfg!(feature = "homogeneous"); settings.parse_extern_interrupt = true; settings.parse_schedule = true; |