0
我收到以下錯誤而編譯:答案:C:的「LCD」存儲大小是不知道
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();
}
你已經包含了定義'DisplaySettings'結構的頭文件嗎? –