You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
663 B
42 lines
663 B
3 months ago
|
#include "eeprom_address.h"
|
||
|
#include "eeprom.h"
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
void Eeprom_Initialization(void)
|
||
|
{
|
||
|
|
||
|
EE_Init();
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
bool Eeprom_Get_Parameter(PARAMETER_INFO_BUFF* pParameterBuff)
|
||
|
{
|
||
|
uint16_t i;
|
||
|
bool bRet = true;
|
||
|
|
||
|
for(i = 0 ; i < EE_INDEX_MAX ; i++)
|
||
|
{
|
||
|
pParameterBuff->Parameter_Buff[i] = 0x0000;
|
||
|
EE_ReadVariable(i, &pParameterBuff->Parameter_Buff[i]);
|
||
|
}
|
||
|
return bRet;
|
||
|
}
|
||
|
|
||
|
bool Eeprom_Save_Parameter(PARAMETER_INFO_BUFF* pParameterBuff)
|
||
|
{
|
||
|
uint16_t i;
|
||
|
bool bRet = true;
|
||
|
for(i = 0 ; i < EE_INDEX_MAX ; i++)
|
||
|
{
|
||
|
EE_WriteVariable(i, pParameterBuff->Parameter_Buff[i]);
|
||
|
}
|
||
|
|
||
|
return bRet;
|
||
|
}
|
||
|
|