1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #21074 from derMihai/mir/fix_dose_poweroff

drivers/dose: fix poweroff
This commit is contained in:
benpicco 2024-12-13 15:29:35 +00:00 committed by GitHub
commit 24dc0143f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -679,7 +679,10 @@ static void _poweroff(dose_t *ctx, dose_state_t sleep_state)
return;
}
wait_for_state(ctx, DOSE_STATE_IDLE);
/* allow powering off without a state transition */
if (ctx->state != DOSE_STATE_IDLE) {
wait_for_state(ctx, DOSE_STATE_IDLE);
}
if (gpio_is_valid(ctx->standby_pin)) {
gpio_set(ctx->standby_pin);