diff options
Diffstat (limited to 'embassy-executor-macros/src/lib.rs')
| -rw-r--r-- | embassy-executor-macros/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/embassy-executor-macros/src/lib.rs b/embassy-executor-macros/src/lib.rs index c9d58746a..5461fe04c 100644 --- a/embassy-executor-macros/src/lib.rs +++ b/embassy-executor-macros/src/lib.rs | |||
| @@ -62,6 +62,13 @@ pub fn task(args: TokenStream, item: TokenStream) -> TokenStream { | |||
| 62 | task::run(&args.meta, f).unwrap_or_else(|x| x).into() | 62 | task::run(&args.meta, f).unwrap_or_else(|x| x).into() |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | #[proc_macro_attribute] | ||
| 66 | pub fn main_avr(args: TokenStream, item: TokenStream) -> TokenStream { | ||
| 67 | let args = syn::parse_macro_input!(args as Args); | ||
| 68 | let f = syn::parse_macro_input!(item as syn::ItemFn); | ||
| 69 | main::run(&args.meta, f, main::avr()).unwrap_or_else(|x| x).into() | ||
| 70 | } | ||
| 71 | |||
| 65 | /// Creates a new `executor` instance and declares an application entry point for Cortex-M spawning the corresponding function body as an async task. | 72 | /// Creates a new `executor` instance and declares an application entry point for Cortex-M spawning the corresponding function body as an async task. |
| 66 | /// | 73 | /// |
| 67 | /// The following restrictions apply: | 74 | /// The following restrictions apply: |
