资源描述:
《向nvram中添加记录的步骤》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、plutommimmiFrameworkNVRAMManagerNVRAMManagerIncNVRAMEnum.hnvram_LID_cust_enum中添加NVRAM_EF_ZHUL_INFO_LID,customappDS800A_6219_BBcustom_nvram_editor_data_item.h#defineNVRAM_EF_ZHUL_INFO_LID_VERNO"001"typedefstruct{kal_uint8zhuldata[10];}nvram_zh
2、ul_info_struct;LID_BITVER_LID(NVRAM_EF_ZHUL_INFO_LID)nvram_zhul_info_struct*NVRAM_ZHUL_INFO_RECORD_TOTAL{zhuldata:"zhuldata"{};};这部分代码可能只是为了显示某些提示信息,对数据没有影响,不知道在哪里能看到这些信息SrccustomappDS800A_6219_BBvram_user_defs.hnvram_LID_cust_enum中添加NVRAM_EF_ZHU
3、L_INFO_LID这是跟NVRAMEnum.h中重复的#defineNVRAM_ZHUL_INFO_RECORD_SIZE40#defineNVRAM_ZHUL_INFO_RECORD_TOTAL2customappDS800A_6219_BBvram_user_config.c默认值(格式化并下载后的初始值)statickal_uint8constNVRAM_ZHUL_VALUES_DEFAULT[NVRAM_ZHUL_INFO_RECORD_SIZE]={0x07,0x20,0x30
4、,0x00,0x00,0x00,0x00,0x00,0x00,0x00};在结构constltable_entry_structlogical_data_item_table_cust[NVRAM_EF_LAST_LID_CUST-NVRAM_LID_CUST_BEGIN]=的末尾添加{NVRAM_EF_ZHUL_INFO_LID,NVRAM_ZHUL_INFO_RECORD_SIZE,NVRAM_ZHUL_INFO_RECORD_TOTAL,NVRAM_ZHUL_VALUES_DEFAULT,NV
5、RAM_ATTR_NONE,NVRAM_CATEGORY_USER,NVRAM_DRV_FDM,"CT2n",VER(NVRAM_EF_ZHUL_INFO_LID),"ZhulInfo ",NVRAM_AVERAGE_LID,(kal_uint8)NVRAM_EF_ZERO_DEFAULT_VALUE,/*Reserved.recordIDiscalculatedbyNVRAM*/},其中"CT2n"是接着前一条记录的“恢复出厂设置”能够恢复的数据“恢复出厂设置”需要恢复的NVRAM记录保存在lt
6、able_entry_structlogical_data_item_table_custpack[NVRAM_EF_LAST_LID_CUSTPACK-NVRAM_EF_CUSTPACK_BASE]中srccustomappPETITE_05C_BBvram_user_defs.h在NVRAM_LID_CUSTPACK_ENUM中添加,NVRAM_EF_ZHUL_INFO_LID原来添加了NVRAM_EF_ZHUL_INFO_LID定义的地方要删除srccustomappPET
7、ITE_05C_BBvram_user_config.c在logical_data_item_table_custpack的最后添加记录{NVRAM_EF_ZHUL_INFO_LID,NVRAM_ZHUL_INFO_RECORD_SIZE,NVRAM_ZHUL_INFO_RECORD_TOTAL,NVRAM_EF_FF_DEFAULT,NVRAM_ATTR_NONE,(NVRAM_CATEGORY_USER
8、NVRAM_CATEGORY_FACTORY),NVRAM_DRV_FDM,"CP0e"
9、,VER(NVRAM_EF_ZHUL_INFO_LID),"ZhulInfo ",NVRAM_AVERAGE_LID,(kal_uint8)NVRAM_INVALID_VALUE,/*Reserved.recordIDiscalculatedbyNVRAM*/},其中"CP0e"是接着前面的记录的(NVRAM_CATEGORY_USER
10、NVRAM_CATEGORY_FACTORY),如果改成NVRAM_CATEGORY_USER的话,writerecord的时候黑