\r
static button_press_state_t g_pwrkey_press_state = RELEASED;\r
static startup_reason_t startup_reason = STARTUP_OTHER;\r
+\r
+#define PRESS_COUNT_LIMIT 5\r
static button_press_state_t porting_button_get_state(void)\r
{\r
if ((readl(ANA_STS) & 0x3) == 0) {\r
g_pwrkey_press_state = porting_button_get_state();\r
PRINT("bootup timeout %d g_pwrkey_press_state %d"NEWLINE,pressed_count,g_pwrkey_press_state);\r
pressed_count ++ ;\r
- if (pressed_count>=10)\r
+ if (pressed_count>=PRESS_COUNT_LIMIT)\r
{\r
break;\r
}\r
uapi_tcxo_delay_ms(200);\r
}\r
\r
- if(pressed_count < 5 )\r
+ if(pressed_count < PRESS_COUNT_LIMIT )\r
{\r
PRINT("not pressed 3 seconds , poweroff!"NEWLINE);\r
uapi_poweroff_device();\r