sunsundsp 发表于 2013-8-9 13:42

line 27: error: expected an expression 求解

出现"main_nonBIOS.c", line 27: error: expected an expression这个错误不知道错在哪

void main(void)
{
    /*** CPU Initialization ***/
    InitSysCtrl();                //Initialize the CPU (FILE: SysCtrl.c)
    DINT;
    IER = 0x0000;        // Disable CPU interrupts
    IFR = 0x0000;        // Clear all CPU interrupt flags
    InitXintf();                //Initialize the external memory interface (FILE: Xintf.c)
    //InitGpio();                // Initialize the shared GPIO pins (FILE: Gpio.c)
    InitPieCtrl();                // Initialize and enable the PIE (FILE: PieCtrl.c)
    InitEv();                        // Initialize the EV(FILE: Ev.c)--And initialize the Timer1
    InitCpuTimers();
        // Initialize the time (FILE: DSP281x_CpuTimers.c)
    FFT(float DataR,float DataI);
InitForFFT();
    EALLOW;                                // This is needed to write to EALLOW protected registers
    PieVectTable.TINT0 = &cpu_timer0_isr;//timer0中断服务子程序重定位
    EDIS;                           // This is needed to disable write to EALLOW protected registers
    IER |= M_INT1;                // EV Interrupt
    IFR &= 0x0000;                //Clear all interrupt flag
    // Enable TINT0 in the PIE: Group 1 interrupt 7
    PieCtrlRegs.PIEIER1.bit.INTx7 = 1;

有颜色的那句话就是错误所在行 如果去掉括号里的东西 也报错说是too few arguments in function call

我在头文件中定义了这个函数

extern float sin_tab,cos_tab;
extern float fWaveR,fWaveI,w;
extern void InitForFFT();
extern void FFT(float DataR,float DataI);

sunsundsp 发表于 2013-8-9 13:43

FFT(float DataR,float DataI);
这句话

sunsundsp 发表于 2013-8-9 16:44

好像在头文件中去掉fft括号里面的东西 然后在主函数初始化中也不要括号里面的就好了。

zhangmangui 发表于 2013-8-10 12:35

帮忙顶   高手解答

aresc 发表于 2013-8-11 09:56

本帖最后由 aresc 于 2013-8-11 10:03 编辑

把两个float去掉先! 另外DataR, DataI, ADsample是个啥??应该写成FFT( DataR, DataI)。
页: [1]
查看完整版本: line 27: error: expected an expression 求解