Skip to content

Commit

Permalink
Merge pull request #17975 from OlegHahm/backport/2022.04/PM_NUM_MODES…
Browse files Browse the repository at this point in the history
…-count

pm: don't (un)block IDLE mode [backport 2022.04]
  • Loading branch information
OlegHahm authored Apr 21, 2022
2 parents a5f0364 + 43d6dc4 commit b642445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/lorawan/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int main(void)
* in general provides RAM retention after wake-up.
*/
#if IS_USED(MODULE_PM_LAYERED)
for (unsigned i = 1; i < PM_NUM_MODES; ++i) {
for (unsigned i = 1; i < PM_NUM_MODES - 1; ++i) {
pm_unblock(i);
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions pkg/openwsn/contrib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void board_init_openwsn(void)
LOG_DEBUG("[openwsn/board]: init\n");

#ifdef MODULE_PM_LAYERED
/* sleeping is currently not supported, block all sleep modes */
for (uint8_t i = 0; i < PM_NUM_MODES; i++) {
/* sleeping is currently not supported, block all sleep modes except IDLE */
for (uint8_t i = 0; i < PM_NUM_MODES - 1; i++) {
pm_block(i);
}
#endif
Expand Down

0 comments on commit b642445

Please sign in to comment.