求解析
电子时钟程序,如下是部分程序,想保存一个数据,调用保存时无法运行被调用的保存子程序
#define EEPROM_TIMER_GEWEI 0x02
uint16 g_u8LedDisplayBuffer[6] = {0,0,0,0,0,0} ;
SaveIntDirect(EEPROM_TIMER_GEWEI,g_u8LedDisplayBuffer[4] ); //调用
void SaveIntDirect(uchar Addr,uint Data)
{
uint ReadData;
uint i;
do
{
while(!ISendStr(0xa0,Addr,(uchar *)&Data,2));
for(i=0;i<5000;i++);
while(!IRcvStr(0xa0,Addr,(uchar *)&ReadData,2))
{
for(i=0;i<100;i++);
}
}
while (Data!=ReadData);
} |