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:
commit
24dc0143f8
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user