优化 web_log

This commit is contained in:
zogodo
2020-01-12 13:18:31 +08:00
parent cdbabf672b
commit e7814de6fd
4 changed files with 10 additions and 9 deletions

View File

@@ -168,8 +168,8 @@ static void KeyTimeoutHandler(void* arg)
key_time = 101;
}
}
} else
}
else
{
//button released
if (key_time < BUTTON_LONG_PRESS_TIME)
@@ -177,7 +177,8 @@ static void KeyTimeoutHandler(void* arg)
key_time = 0;
os_log("button short pressed:%d",key_time);
KeyShortPress();
} else if (key_time > 100)
}
else if (key_time > 100)
{
MicoSystemReboot();
}
@@ -189,6 +190,7 @@ static void KeyFallingIrqHandler(void* arg)
{
mico_rtos_start_timer(&user_key_timer);
}
void KeyInit(void)
{
MicoGpioInitialize(Button, INPUT_PULL_UP);