コード例 #1
0
ファイル: cgiflash.c プロジェクト: beckdac/esphttpd
int ICACHE_FLASH_ATTR cgiUpgradeRaw(HttpdConnData *connData) {
	int ret = cgiUploadRaw(connData);
	if (ret == HTTPD_CGI_DONE){
		system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
		// Schedule a reboot
		os_timer_disarm(&flash_reboot_timer);
		os_timer_setfn(&flash_reboot_timer, (os_timer_func_t *)system_upgrade_reboot, NULL);
		os_timer_arm(&flash_reboot_timer, 2000, 1);
		
	}
	return ret;
}
コード例 #2
0
ファイル: cgiflash.c プロジェクト: koltegirish/esphttpd-1
/*	cgiUpgradeRaw	*/
int ICACHE_FLASH_ATTR cgiUpgradeRaw(HttpdConnection *	ptConnection)
{
	/* initialization */
	int iRet = 0;

	iRet = cgiUploadRaw(ptConnection);

	if (HTTPD_CGI_DONE == iRet)
	{
		/* once completed flashing */
		system_upgrade_flag_set(UPGRADE_FLAG_FINISH);

		/* schedule reboot */
		os_timer_disarm(&flash_reboot_timer);
		os_timer_setfn(&flash_reboot_timer, (os_timer_func_t *)system_upgrade_reboot, NULL);
		os_timer_arm(&flash_reboot_timer, 2000, 1);
		
	}
	return iRet;
}