35 lines
599 B
C
35 lines
599 B
C
|
|
|
|||
|
|
#ifndef __NVPARA_H__
|
|||
|
|
#define __NVPARA_H__
|
|||
|
|
|
|||
|
|
#include "config.h"
|
|||
|
|
|
|||
|
|
// <09><><EFBFBD><EFBFBD>ʧ<EFBFBD>Դ洢<D4B4><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD>ı䣬<C4B1>ҿ<EFBFBD><D2BF><EFBFBD>ͻȻ<CDBB>ϵ<EFBFBD><CFB5><EFBFBD>Ҫʱ<D2AA>̱<EFBFBD><CCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// Non-volatile
|
|||
|
|
//---------------------------
|
|||
|
|
|
|||
|
|
//---------------------------
|
|||
|
|
|
|||
|
|
#define MAX_SAVE_SIZE (256-2) // <20><>256<35>ֽ<EFBFBD>
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
u8 nvBuff[MAX_SAVE_SIZE];
|
|||
|
|
u16 enFlag; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>־
|
|||
|
|
} __attribute__ ((packed)) NVPara;
|
|||
|
|
|
|||
|
|
#define NVPARA_EN DATA_VALID
|
|||
|
|
|
|||
|
|
#define NVPARA_SIZE sizeof(NVPara)
|
|||
|
|
|
|||
|
|
|
|||
|
|
//---------------------------
|
|||
|
|
|
|||
|
|
int ReadNVPara(NVPara * pPara, int loc);
|
|||
|
|
void SaveNVPara(NVPara * pPara, int loc);
|
|||
|
|
|
|||
|
|
//---------------------------
|
|||
|
|
|
|||
|
|
#endif
|
|||
|
|
|