rtic-macros: forward attributes applied to app module

Instead of ignoring additional attributes applied to the app
module, we can forward them to the generated code.
This commit is contained in:
Johannes Cornelis Draaijer 2025-09-03 13:53:50 +02:00 committed by Henrik Tjäder
parent fa2c8c1dcd
commit 3ba1632f8d
8 changed files with 78 additions and 2 deletions

View file

@ -44,12 +44,14 @@ pub fn app(app: &App, analysis: &Analysis) -> TokenStream2 {
let user_code = &app.user_code;
let name = &app.name;
let device = &app.args.device;
let attribute_metas = &app.attribute_metas;
let rt_err = util::rt_err_ident();
let async_limit = bindings::async_prio_limit(app, analysis);
quote!(
/// The RTIC application module
#(#[#attribute_metas])*
pub mod #name {
/// Always include the device crate which contains the vector table
use #device as #rt_err;