/****************************************************************************** * FunctionName : user_plug_long_press * Description : key's long press function, needed to be installed * Parameters : none * Returns : none *******************************************************************************/ LOCAL void ICACHE_FLASH_ATTR user_plug_long_press(void) { user_esp_platform_set_active(0); system_restore(); system_restart(); }
/****************************************************************************** * FunctionName : user_plug_long_press * Description : key's long press function, needed to be installed * Parameters : none * Returns : none *******************************************************************************/ LOCAL void user_plug_long_press(void) { int boot_flag=12345; user_esp_platform_set_active(0); system_restore(); system_rtc_mem_write(70, &boot_flag, sizeof(boot_flag)); printf("long_press boot_flag %d \n",boot_flag); system_rtc_mem_read(70, &boot_flag, sizeof(boot_flag)); printf("long_press boot_flag %d \n",boot_flag); #if RESTORE_KEEP_TIMER user_platform_timer_bkup(); #endif system_restart(); }