Esempio n. 1
0
void LoadParamsFromEEPROM(void)
{
			printf("load params from eeprom failed,set default value\r\n");
		
			ParamSetDefault();//版本检测不对,各项参数设为默认值
			ParamToTable();
			table.version=EEPROM_DEFAULT_VERSION;
			TableWriteEEPROM();
	
}
Esempio n. 2
0
void LoadParamsFromEEPROM(void)
{
	if(isEEPROMValid())
	{
			TableReadEEPROM();
			TableToParam();

	}
	else
	{

			ParamSetDefault();//版本检测不对,各项参数设为默认值
			ParamToTable();
			table.version=EEPROM_DEFAULT_VERSION;
			TableWriteEEPROM();
	}
}
Esempio n. 3
0
void SaveParamsToEEPROM(void)
{
		ParamToTable();
		TableWriteEEPROM();
}