Skip to content
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

Allow variables in Task names #688

Open
David-OConnor opened this issue Jan 21, 2023 · 0 comments
Open

Allow variables in Task names #688

David-OConnor opened this issue Jan 21, 2023 · 0 comments
Labels
#[cfg] Issues related to #[cfg] attributes

Comments

@David-OConnor
Copy link

David-OConnor commented Jan 21, 2023

Desired behavior:

#[cfg(feature = "h7")]
const DMA1_2: Interrupt = Interrupt::DMA1_STR2;
#[cfg(feature = "g4")]
const DMA1_2: Interrupt = Interrupt::DMA1_CH2;

#[task binds = DMA1_2, ...

Follow-up from Element thread with Korken. Sounds possible via supporting CFG in the binds argument. Posting here due to it being easier to catalog the request.

Currently, the Task (and other) RTIC macros don't allow dynamic code; they require hard-coded names.

#664 is related.

@AfoHT AfoHT added the #[cfg] Issues related to #[cfg] attributes label Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#[cfg] Issues related to #[cfg] attributes
Projects
None yet
Development

No branches or pull requests

2 participants