注释掉触发深度睡眠相关代码
This commit is contained in:
parent
d759c0ce4e
commit
0c902ceecf
@ -264,7 +264,9 @@ void power_off()
|
||||
// extern bk_err_t video_turn_off(void);
|
||||
// audio_turn_off();
|
||||
// video_turn_off();
|
||||
bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
|
||||
|
||||
//zhanyu
|
||||
// bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
|
||||
}
|
||||
|
||||
void power_on()
|
||||
@ -474,8 +476,8 @@ static void handle_system_event(key_event_t event)
|
||||
bk_pm_sleep_mode_set(PM_MODE_DEEP_SLEEP);
|
||||
rtos_delay_milliseconds(10);
|
||||
}
|
||||
|
||||
static void bk_wait_power_on()
|
||||
//zhanyu
|
||||
/* static void bk_wait_power_on()
|
||||
{
|
||||
uint32_t press_time = 0;
|
||||
GLOBAL_INT_DECLARATION();
|
||||
@ -506,7 +508,7 @@ static void handle_system_event(key_event_t event)
|
||||
bk_key_register_wakeup_source();
|
||||
bk_enter_deepsleep();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
|
||||
void user_app_main(void)
|
||||
@ -564,13 +566,14 @@ static void handle_system_event(key_event_t event)
|
||||
#if (CONFIG_SYS_CPU0)
|
||||
/*to judgement key is long press or short press; long press exit deepsleep*/
|
||||
|
||||
if (bk_misc_get_reset_reason() == RESET_SOURCE_DEEPPS_GPIO /*&& (bk_gpio_get_wakeup_gpio_id() == KEY_GPIO_12)*/)
|
||||
{
|
||||
// motor vibration
|
||||
motor_open(PWM_MOTOR_CH_3);
|
||||
bk_wait_power_on();
|
||||
motor_close(PWM_MOTOR_CH_3);
|
||||
}
|
||||
//zhanyu
|
||||
// if (bk_misc_get_reset_reason() == RESET_SOURCE_DEEPPS_GPIO && (bk_gpio_get_wakeup_gpio_id() == KEY_GPIO_12))
|
||||
// {
|
||||
// // motor vibration
|
||||
// motor_open(PWM_MOTOR_CH_3);
|
||||
// bk_wait_power_on();
|
||||
// motor_close(PWM_MOTOR_CH_3);
|
||||
// }
|
||||
|
||||
bk_regist_factory_user_config((const struct factory_config_t *)&s_user_config,
|
||||
sizeof(s_user_config) / sizeof(s_user_config[0]));
|
||||
|
@ -18,8 +18,9 @@ beken2_timer_t g_countdown_timer;
|
||||
void CountdownCallback()
|
||||
{
|
||||
LOGI("Standy time is up, start enter deepsleep\r\n");
|
||||
extern void bk_reboot_ex(uint32_t reset_reason);
|
||||
bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
|
||||
//zhanyu
|
||||
//extern void bk_reboot_ex(uint32_t reset_reason);
|
||||
// bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
|
||||
}
|
||||
|
||||
void start_countdown(uint32_t time_ms)
|
||||
|
Loading…
x
Reference in New Issue
Block a user