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

Add internal features for device capabilities #130

Open
usbalbin opened this issue Aug 1, 2024 · 0 comments
Open

Add internal features for device capabilities #130

usbalbin opened this issue Aug 1, 2024 · 0 comments

Comments

@usbalbin
Copy link
Contributor

usbalbin commented Aug 1, 2024

Today we have lots of places with code like this:

#[cfg(any(
    feature = "stm32g471",
    feature = "stm32g473",
    feature = "stm32g474",
    feature = "stm32g483",
    feature = "stm32g484",
    feature = "stm32g491",
    feature = "stm32g4a1",
))]
use self::config::ExternalTrigger345;

What do you think about adding a set of internal device features so something like the above instead could be written like

#[cfg(feature = "has_adc345")]
use self::config::ExternalTrigger345;

or similar?

Here is a list of device capabilities.

BTW is there any way to make these features internal/private since they are supposed to be selected as a direct consequence of selecting mcu feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant