unsigned ch ar ORGDATA【16】={0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,
0x01,0x03,0x05,0x07,0x09,0x0B,0x0D,0x0F}; //原始数据
unsigned ch ar CMPDATA【16】; //比较数据
//仿真时在watch窗口,监控这些全局变量。
//EEPROM 变量定义
unsigned ch ar Evalvoid【16】 __attribute__((section(".eeprom"))); //这个没用到
unsigned ch ar Eval【16】 __attribute__((section(".eeprom")));
int main(void)
{
eeprom_write_byte (0x40,0xA5); //向EEPROM的0x40地址写入数据 0xA5
EDATA=eeprom_read_byte (0x40); //读出,然后看看数据对不对?
//上面两句编译是有如下警告,但不必理会
//EEPROM_main.c:103: warning: passing arg 1 of `eeprom_write_byte‘ makes pointer from integer without a cast
//EEPROM_main.c:104: warning: passing arg 1 of `eeprom_read_byte‘ makes pointer from integer without a cast