代码如下:
#include "Main.h"
#include "Swit_A.h"
#include "0_01_12g.H"
#include "LED_Swit.h"
#include "PORT.H"
/* ............................................................... */
/* ............................................................... */
void main(void)
{
// Set up the scheduler
void SCH_Init_T0();
void SWITCH_Init();
int X=0;
int Y=0;
SCH_Add_Task( GR, 0, 4000);
SCH_Add_Task( void XX(X), 3000 , 8000);
SCH_Add_Task( void XX(Y), 7000 , 8000);
SCH_Add_Task( void YY(X), 4000 , 8000);
SCH_Add_Task( void YY(Y), 8000 , 8000);
SCH_Start();
while(1)
{
SCH_Dispatch_Tasks();
}
}
用到的函数先前都有定义:
void YY (a)
{ a=0;
}
void XX (b)
{ b=1;}
但是函数名前不加void就会变成
*** ERROR C267 IN LINE 56 OF Main.c: 'XX': requires ANSI-style prototype
*** ERROR C193 IN LINE 56 OF Main.c: 'parameter': bad operand type
*** ERROR C193 IN LINE 57 OF Main.c: 'parameter': bad operand type
*** ERROR C193 IN LINE 58 OF Main.c: 'parameter': bad operand type
*** ERROR C193 IN LINE 59 OF Main.c: 'parameter': bad operand type求助!!!!
catspeake
大话西游666
相关分类