解决写数据时掉电,数据错乱的问题
This commit is contained in:
parent
09dc02ae52
commit
177981a99f
|
@ -204,10 +204,10 @@ static char *Mw_Cfg_Find_Correct_Cfg(Mw_CfgStorage_Partition_e part, char *main,
|
||||||
right_cfg = back;
|
right_cfg = back;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( Mw_Cfg_CheckValid(part, CFG_STORAGE_REGION_BACK, pmain_header, size) ) {
|
if ( Mw_Cfg_CheckValid(part, CFG_STORAGE_REGION_BACK, pback_header, size) ) {
|
||||||
s_mw_cfg.active_region[part] = CFG_STORAGE_REGION_BACK;
|
s_mw_cfg.active_region[part] = CFG_STORAGE_REGION_BACK;
|
||||||
right_cfg = back;
|
right_cfg = back;
|
||||||
} else if ( Mw_Cfg_CheckValid(part, CFG_STORAGE_REGION_MAIN, pback_header, size) ) {
|
} else if ( Mw_Cfg_CheckValid(part, CFG_STORAGE_REGION_MAIN, pmain_header, size) ) {
|
||||||
s_mw_cfg.active_region[part] = CFG_STORAGE_REGION_MAIN;
|
s_mw_cfg.active_region[part] = CFG_STORAGE_REGION_MAIN;
|
||||||
right_cfg = main;
|
right_cfg = main;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue