Skip to main content

Crate ferroforge_macros

Crate ferroforge_macros 

Source
Expand description

FerroForge’s procedural macros.

Two entry points, and nothing between them, named as RTIC names the same ideas. #[ferroforge::task] turns a task definition into an ordinary generic function and a real context type; ferroforge::app! expands a firmware in place into a real #[rtic::app] whose handlers construct that context and call the function.

Neither reads the other’s crate. app! emits real Rust paths into the task crates a firmware depends on, so a wrong definition, binding or type is an ordinary compile error at the authored line.

Macros§

app
The firmware’s authored application, expanded in place into a real #[rtic::app]. Init and resources are written here and never move; each task declaration becomes an adapter that calls the selected definition.

Attribute Macros§

task
A task definition: expands to a real generic context and an ordinary generic function, with no mock layer. A firmware depends on this crate normally and its RTIC handler calls the function, so no source is transplanted and the body is compiled once, in place.