diff options
| author | sodo <[email protected]> | 2023-12-10 01:45:24 +0900 |
|---|---|---|
| committer | sodo <[email protected]> | 2023-12-10 01:45:24 +0900 |
| commit | 58d503a77da73204f097fae1f1a2a1ce2cf90600 (patch) | |
| tree | c7739f0342e2e0d243cf9bb652c2246b2499cb23 /embassy-executor-macros/src/lib.rs | |
| parent | 83138ce68e506692aabd825eae39016ddb8fd2c4 (diff) | |
add avr support
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: |
