英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流

标题: 如何在c写的程序中嵌入eeprom的数据定义? [打印本页]

作者: winnie    时间: 2009-4-25 15:11
标题: 如何在c写的程序中嵌入eeprom的数据定义?
union Co_AB  
  {
   struct
   {double fA;
    unsigned char ChkSumA;
    double fB;
    unsigned char ChkSumB;
   }Float;
struct
   {unsigned char A1;     
    unsigned char A2;
    unsigned char A3;
    unsigned char A4;  
    unsigned char ChkSumA;
   
    unsigned char B1;     
    unsigned char B2;
    unsigned char B3;
    unsigned char B4;  
    unsigned char ChkSumB;
   }Char;
  };
  
__no_init __eeprom union Co_AB ParaAB[8];
typedef struct
  {unsigned char H;
   unsigned char M;
   unsigned char L;
   unsigned char ChkSum;
  }ThreeChar;
  
__no_init __eeprom ThreeChar ADOffsetCal[8];
__no_init __eeprom ThreeChar ADGainCal[8];




欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/) Powered by Discuz! X3.2