-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externally defined Init/Idle #71
base: master
Are you sure you want to change the base?
Conversation
5cec489
to
cae4638
Compare
Tasks can be externally defined, so should idle and init
cae4638
to
ac14402
Compare
Review this pr please, it's very important for those who use Clion without proper macro proc. Actually the only way to write code with autocomplete and syntax highlighting. |
Indeed, however there is more work needed in codegen to make this work, this is the first step (the parsing). |
TODO: Make sure that the visibility of the shared and local struct is pub if externalized, and propagate it |
Commenting to express some interest in this feature. I'm starting to work on some more complicated apps and I'd love to put initialization in a separate module. |
767: allow #[init] and #[idle] to be externed r=korken89 a=wiktorwieclaw I updated `rtic-macros` to a allow init and idle to be externally defined. ## Design notes * Updated `extern_binds` example to include external #[init] and #[idle] functions. * Added docs to Local and Shared structs. The `extern_binds` example has a `#![deny(missing_docs)]` which caused some issues. ## Testing Apart from building the example, I also used this feature in one of my projects and ran it on a MCU [here](https://github.com/grupacosmo/cansat/blob/98ca7bd42e737adfb140a548da1ade01beb495da/crates/cansat-stm32f4/src/main.rs#L59-L74) ## Related issues * #505 ## Related PRs * rtic-rs/rtic-syntax#71 Co-authored-by: Vixu <[email protected]>
Tasks support being externally defined, idle and init should too.
rtic-syntax component of fixing rtic-rs/rtic#505