winnie 发表于 2009-4-25 15:11:25

如何在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;
typedef struct
{unsigned char H;
   unsigned char M;
   unsigned char L;
   unsigned char ChkSum;
}ThreeChar;

__no_init __eeprom ThreeChar ADOffsetCal;
__no_init __eeprom ThreeChar ADGainCal;
页: [1]
查看完整版本: 如何在c写的程序中嵌入eeprom的数据定义?