文件1.c extern uint8 **; extern uint8 Symbol;
extern void WriteScreen(uint8 *DisplayData); 这个函数
/* ********************************************************** * 名称:TaskDISPLAYLCD() * 功能:测试flash的读 2007-3-10 * 入口参数:pdata 任务初始化参数 * 出口参数:无 ********************************************************** */ void TaskDISPLAY(void *pdata) { pdata = pdata; initLCDM(); while(1) { IO0CLR = BEEP; OSTimeDly(OS_TICKS_PER_SEC / 5); IO0SET = BEEP; OSTimeDly(OS_TICKS_PER_SEC / 5); WriteScreen( **); delayms(500); 这个函数出错 } }
文件2.c void WriteScreen(uint8 *DisplayData);
//----------------------------------- // dispaly data (128x64) //----------------------------------- uint8 **[]={ 0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,。。。。}
//----------------------------------- // Write a Screen //----------------------------------- void WriteScreen(uint8 *DisplayData) // DisplayData should be 164x64/8 = 1312byte { uint8 TempData; uint8 i, j; for(i=0;i<8;i++) { SdCmd(0xb0 | i); // select page 0~7 SdCmd(0x10); // start form column 4 SdCmd(0x04); // (2byte command) for(j=0;j<128;j++) { TempData=(*(DisplayData+(i*128)+j)); SdData(TempData); } } }
在文件1.c中把 extern void WriteScreen(uint8 *DisplayData); 屏蔽后没错,但有警告 不明白为什么声明外部函数会出错? 请高手指点迷津谢谢!
|