diff options
Diffstat (limited to 'rtic-macros')
-rw-r--r-- | rtic-macros/src/codegen/module.rs | 11 | ||||
-rw-r--r-- | rtic-macros/src/syntax/ast.rs | 3 | ||||
-rw-r--r-- | rtic-macros/src/syntax/parse/app.rs | 15 |
3 files changed, 1 insertions, 28 deletions
diff --git a/rtic-macros/src/codegen/module.rs b/rtic-macros/src/codegen/module.rs index cf066ef9..60905889 100644 --- a/rtic-macros/src/codegen/module.rs +++ b/rtic-macros/src/codegen/module.rs @@ -21,17 +21,6 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 { pub core: rtic::export::Peripherals )); - if app.args.peripherals { - let device = &app.args.device; - - fields.push(quote!( - /// Device peripherals (PAC) - pub device: #device::Peripherals - )); - - values.push(quote!(device: #device::Peripherals::steal())); - } - fields.push(quote!( /// Critical section token for init pub cs: rtic::export::CriticalSection<'a> diff --git a/rtic-macros/src/syntax/ast.rs b/rtic-macros/src/syntax/ast.rs index 27e6773f..c3f2befa 100644 --- a/rtic-macros/src/syntax/ast.rs +++ b/rtic-macros/src/syntax/ast.rs @@ -56,9 +56,6 @@ pub struct AppArgs { /// Device pub device: Path, - /// Peripherals - pub peripherals: bool, - /// Interrupts used to dispatch software tasks pub dispatchers: Dispatchers, } diff --git a/rtic-macros/src/syntax/parse/app.rs b/rtic-macros/src/syntax/parse/app.rs index e797f75e..2a5f8d86 100644 --- a/rtic-macros/src/syntax/parse/app.rs +++ b/rtic-macros/src/syntax/parse/app.rs @@ -5,7 +5,7 @@ use proc_macro2::TokenStream as TokenStream2; use syn::{ parse::{self, ParseStream, Parser}, spanned::Spanned, - Expr, ExprArray, Fields, ForeignItem, Ident, Item, LitBool, Path, Token, Visibility, + Expr, ExprArray, Fields, ForeignItem, Ident, Item, Path, Token, Visibility, }; use super::Input; @@ -23,7 +23,6 @@ impl AppArgs { (|input: ParseStream<'_>| -> parse::Result<Self> { let mut custom = Set::new(); let mut device = None; - let mut peripherals = true; let mut dispatchers = Dispatchers::new(); loop { @@ -58,17 +57,6 @@ impl AppArgs { } } - "peripherals" => { - if let Ok(p) = input.parse::<LitBool>() { - peripherals = p.value; - } else { - return Err(parse::Error::new( - ident.span(), - "unexpected argument value; this should be a boolean", - )); - } - } - "dispatchers" => { if let Ok(p) = input.parse::<ExprArray>() { for e in p.elems { @@ -133,7 +121,6 @@ impl AppArgs { Ok(AppArgs { device, - peripherals, dispatchers, }) }) |