-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/stm32: centralize PM_BLOCKER_INITIAL define #11383
cpu/stm32: centralize PM_BLOCKER_INITIAL define #11383
Conversation
* @brief Default initial PM blocker | ||
* @todo All modes are blocked per default, until PM is cleanly implemented | ||
*/ | ||
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 } |
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.
this is now identical as in sys/pm_layered/pm.c
. Should we just drop it?
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.
Yes that was the alternative solution I proposed in the initial comment of this PR. If it's ok for you I can drop it no problem :)
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.
Ah, I just saw that. Yeah, let's drop it.
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.
Done
61b9652
to
db9b341
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.
ACK.
Contribution description
This PR move the PM_BLOCKER_INITIAL macro definition of stm32f1/stm32l0 to a common stm32 place. This is because all STM32 families now support pm_layered.
The define is also overridable now: this is required when one wants to unlock by default a certain pm mode from its application Makefile (useful with LoRaWAN).
Another option is to completely remove the define from stm32l0 and stm32f1, since the default value in pm_layered is already the same. Maybe this would be the preferred solution ?
Testing procedure
A green Murdock should be enough. One can also add
CFLAGS += '-DPM_BLOCKER_INITIAL={ .val_u32=0x01010100 }'
in any application and verify that it builds without error.Issues/PRs references
Required by #11237