Compare commits

..

No commits in common. "0c902ceecf868f0eb171f19c166514365ee9f54d" and "c43d0bdae6967e4469836bc31568ad956f25f0d0" have entirely different histories.

2 changed files with 13 additions and 17 deletions

View File

@ -264,9 +264,7 @@ void power_off()
// extern bk_err_t video_turn_off(void);
// audio_turn_off();
// video_turn_off();
//zhanyu
// bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
}
void power_on()
@ -476,8 +474,8 @@ static void handle_system_event(key_event_t event)
bk_pm_sleep_mode_set(PM_MODE_DEEP_SLEEP);
rtos_delay_milliseconds(10);
}
//zhanyu
/* static void bk_wait_power_on()
static void bk_wait_power_on()
{
uint32_t press_time = 0;
GLOBAL_INT_DECLARATION();
@ -508,7 +506,7 @@ static void handle_system_event(key_event_t event)
bk_key_register_wakeup_source();
bk_enter_deepsleep();
}
}*/
}
#endif
void user_app_main(void)
@ -566,14 +564,13 @@ 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*/
//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);
// }
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]));

View File

@ -18,9 +18,8 @@ beken2_timer_t g_countdown_timer;
void CountdownCallback()
{
LOGI("Standy time is up, start enter deepsleep\r\n");
//zhanyu
//extern void bk_reboot_ex(uint32_t reset_reason);
// bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
extern void bk_reboot_ex(uint32_t reset_reason);
bk_reboot_ex(RESET_SOURCE_FORCE_DEEPSLEEP);
}
void start_countdown(uint32_t time_ms)