我在编译时遇到以下错误:
MenuNavigationApp.c:58: error: array type has incomplete element type MenuNavigationApp.c:43: error: storage size of ‘lcd' isn't known MenuNavigationApp.c:338: error: too many arguments to function ‘ucSCPowerUp'
这是我的代码:
int ZealMain()
{
UCHAR ucStatus;
struct DisplaySettings lcd ; /* line 43 */
UCHAR seq[]={'0','1','2'},ucKey=0;
BOOL bStatus;
UCHAR ucGetStringBuf[3];
UINT ucGetStringBuf1,uiTimeOut=0;
UINT ucGetStringBuf2;
lcd.bFullScreen=1;
lcd.ucStartPoint=5;
lcd.ucEndPoint=50;
lcd.bSelectOption=1;
lcd.bModeSelect=0;
lcd.ucSelectedItem=0;
int uitimeout=30;
struct FunctionInfo Zealperiph[]={ /* line 58 */
/* Function information array */
{"LCD",1,"0",NULL,NULL},
{"DISPLAY CENTER",2,"00",vLcdDispCenter,NULL},
{"Display CIRCLE",2,"01",vLcdDispCircle,NULL},
/* a lot more of these ... */
{"PRINT DATA",2,"70",vPrintData,NULL}};
ucStatus=ucMenuNavigation("ZEAL INTERACTIVE",Zealperiph,33,0,uiTimeOut,&lcd);
if(ucStatus!=1)
bLCDDispCenter("Values are Incorrect",TIMES8_13);
}
void vPowerUp()
{
UCHAR ucAtrBuff[50],ucAtrlen,ucStatus;
ucSCPowerUp(ucAtrBuff, &ucAtrlen,0x27); /* line 338 */
vGetCardStatus();
}
答案 0 :(得分:1)
你在哪里有
的定义 struct DisplaySettings lcd
?似乎不见了。
答案 1 :(得分:1)
行号错误。图43和58显示结构定义超出了它的范围 用来 。尝试检查已定义它的位置或使用此结构的extern声明...并且第338行的错误显示..在某些地方你可能已经在你的代码中提供的声明中给出了更多args bt ...