We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 02c300c + 4fee1d4 commit fd2a203Copy full SHA for fd2a203
board/hx30/power_button_x86.c
@@ -444,16 +444,15 @@ static void state_machine(uint64_t tnow)
444
case PWRBTN_STATE_HELD:
445
446
if (power_button_is_pressed()) {
447
+ tnext_state = tnow + PWRBTN_WAIT_HOLD;
448
if (!gpio_get_level(GPIO_ON_OFF_FP_L)) {
- tnext_state = tnow + PWRBTN_WAIT_HOLD;
449
if (++hold_check < PWRBTN_FP_HOLD_COUNT)
450
break;
451
452
hold_check = 0;
453
tnext_state = tnow + PWRBTN_STATE_DELAY;
454
pwrbtn_state = PWRBTN_STATE_NEED_SHUTDOWN;
455
} else if (!gpio_get_level(GPIO_ON_OFF_BTN_L)) {
456
457
if (++hold_check < PWRBTN_HOLD_COUNT)
458
459
0 commit comments