-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/periph_common: add periph_init% modules #13511
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
Conversation
4508f48
to
d4c3180
Compare
No longer waiting for another PR, I changed the name of all modules to |
d9d2d21
to
c1e117c
Compare
Only the following failures:
I believe they are unrelated. |
@benpicco let me know if I should squash. |
Yes, please squash! |
c1e117c
to
740a386
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Murdock is happy and better control of what gets initialized automatically is always useful.
Now tests don't have to blanket disable auto_init
(and break stdio_cdc_acm
) anymore when in fact they just want to disable auto init of one module!
Thanks for the review! |
I am not really happy with this change. For example, until this change it was sufficient
to enable the RTC commands and use the RTC. With this change it is now necessary to use
It took me some time to figure out the reason why the RTC commands didn't work anymore 😟 The reason is that The expected behavior is the following. If a It seems to work if the To be honest, I don't understand the necessity for this change. Peripherals are only initialized when the according modules are used. If the according modules are used, the application expects that the peripherals are initialized. There is probably no use case where the application might want to disable the initialization of peripherals using |
You can just as well do From my understanding
Well some users had a used case for this #11026. It seems that in some cases the user does want to handle initialization. Anyway:
would work for your use case, would you agree on that fix? |
Hmm make doesn't like this. |
Anyway there are still ways of doing this so it checks |
Unfortunately not 😟
doesn't do the trick. It enables module |
@fjmolinas Sorry my fault, forget it, it works in that way. I had a typo in my command 😎 I can live with this approach, even if it differs from the usual way of activating functionalities. |
Contribution description
Following up on #13089 this PR allows disabling
periph_%
auto initialization by adding explicitperiph_init_%
modules for each one of them.Since they are not initlalized by the
auto-init
module I added aperiph_init
module that just handles enabling or disablingperiph
initialization.Testing procedure
periph_init_%
periph_init
Issues/PRs references
Fixes #11026
depends on #13401