From 5da6ab717f475de79f5e471c5e22e4268d1bd068 Mon Sep 17 00:00:00 2001 From: ThinkPad-T460P Date: Thu, 18 Mar 2021 12:23:23 +0800 Subject: [PATCH] version 0.9.7 --- App/Src/th_exti.c | 8 ++++---- Core/Src/freertos.c | 2 +- Core/Src/main.c | 2 +- Core/Src/navikit.c | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/App/Src/th_exti.c b/App/Src/th_exti.c index fe9cef4..6616878 100644 --- a/App/Src/th_exti.c +++ b/App/Src/th_exti.c @@ -168,7 +168,7 @@ void CustBtnLongPressTimerCallback(void *argument) } void PwrBtnShortPressTimerCallback(void *argument) { - if(osThreadFlagsGet() & THREAD_FLAG_EXTI_SERVICE_PWR_BTN_INACTIVE){//power_button has released +// if(osThreadFlagsGet() & THREAD_FLAG_EXTI_SERVICE_PWR_BTN_INACTIVE){//power_button has released log_v("power button short pressed."); switch(NaviKit.sys.sta){ case run: {//som is running, send sleep requeset to operate system @@ -182,11 +182,11 @@ void PwrBtnShortPressTimerCallback(void *argument) case isp: { }break; default : break; } - } +// } } void CustBtnShortPressTimerCallback(void *argument) { - if(osThreadFlagsGet() & THREAD_FLAG_EXTI_SERVICE_PWR_BTN_INACTIVE){//power_button has released +// if(osThreadFlagsGet() & THREAD_FLAG_EXTI_SERVICE_PWR_BTN_INACTIVE){//power_button has released log_v("custom button short pressed."); switch(NaviKit.sys.sta){ case run:{ @@ -199,7 +199,7 @@ void CustBtnShortPressTimerCallback(void *argument) }break; default : break; } - } +// } } diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c index e6d0dc3..668bd99 100644 --- a/Core/Src/freertos.c +++ b/Core/Src/freertos.c @@ -285,7 +285,7 @@ void StartDefaultTask(void *argument) }else{ NaviKit.sys.next_sta = idle; log_i("EC Reset source: [RTC WakeUP]"); - enter_standby_state(100); + enter_standby_state(0); } }else{//judge reset source "power on" log_i("EC Reset source: [PowerON]"); diff --git a/Core/Src/main.c b/Core/Src/main.c index 6dd2553..ea9ac52 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -101,7 +101,7 @@ int main(void) MX_UART4_Init(); MX_ADC1_Init(); MX_USART1_UART_Init(); - MX_RTC_Init(); +// MX_RTC_Init(); /* Initialize interrupts */ MX_NVIC_Init(); diff --git a/Core/Src/navikit.c b/Core/Src/navikit.c index 825d6c9..e469eb4 100644 --- a/Core/Src/navikit.c +++ b/Core/Src/navikit.c @@ -65,6 +65,7 @@ void enter_standby_state(uint16_t delay){ osDelay(delay); HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);//Enable PA0 wakeup function __HAL_RCC_RTC_DISABLE(); + HAL_RCC_DeInit(); HAL_PWR_EnterSTANDBYMode(); } void enter_isp_state()