1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17974 from benpicco/PM_NUM_MODES-count

pm: don't (un)block IDLE mode
This commit is contained in:
Oleg Hahm 2022-04-21 14:39:07 +02:00 committed by GitHub
commit 843c16ad64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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