|
发表于 2009-3-31 16:19:06
|
显示全部楼层
nvram_common_config.c
static kal_uint8 const NVRAM_EF_SYS_CACHE_OCTET_DEFAULT[]={0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00};
{
NVRAM_EF_SYS_CACHE_OCTET_LID,
NVRAM_EF_SYS_CACHE_OCTET_SIZE,
NVRAM_EF_SYS_CACHE_OCTET_TOTAL,
NVRAM_EF_SYS_CACHE_OCTET_DEFAULT,//NVRAM_EF_ZERO_DEFAULT, 双卡开
NVRAM_ATTR_AVERAGE,
NVRAM_CATEGORY_USER | NVRAM_CATEGORY_SHADOW | NVRAM_CATEGORY_SHADOW_MS,
"MP0a",
VER(NVRAM_EF_SYS_CACHE_OCTET_LID),
"SYS_CACHE_OCTET\0",
NVRAM_RESERVED_VALUE
}
restore.c
ReadRecord(NVRAM_EF_SYS_CACHE_OCTET_LID, NVRAM_SYS_FLIGHTMODE_STATE, &data, NVRAM_EF_SYS_CACHE_OCTET_SIZE, &error);
data[0] = FLIGHTMODE_OFF;
data[2] = 2;
WriteRecord(NVRAM_EF_SYS_CACHE_OCTET_LID, NVRAM_SYS_FLIGHTMODE_STATE, &data, NVRAM_EF_SYS_CACHE_OCTET_SIZE, &error); |
|