打印
[DSP编程]

line 27: error: expected an expression 求解

[复制链接]
5925|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
sunsundsp|  楼主 | 2013-8-9 13:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
出现"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)
    [color=Teal]FFT(float DataR[ADSample],float DataI[ADSample]);
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[ADSample],cos_tab[ADSample];
extern float fWaveR[ADSample],fWaveI[ADSample],w[ADSample];
extern void InitForFFT();
extern void FFT(float DataR[ADSample],float DataI[ADSample]);

相关帖子

沙发
sunsundsp|  楼主 | 2013-8-9 13:43 | 只看该作者
FFT(float DataR[ADSample],float DataI[ADSample]);
这句话

使用特权

评论回复
板凳
sunsundsp|  楼主 | 2013-8-9 16:44 | 只看该作者
好像在头文件中去掉fft括号里面的东西 然后在主函数初始化中也不要括号里面的就好了。

使用特权

评论回复
地板
zhangmangui| | 2013-8-10 12:35 | 只看该作者
帮忙顶   高手解答

使用特权

评论回复
5
aresc| | 2013-8-11 09:56 | 只看该作者
本帖最后由 aresc 于 2013-8-11 10:03 编辑

把两个float去掉先! 另外DataR, DataI, ADsample是个啥??应该写成FFT( DataR, DataI)。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

29

主题

122

帖子

2

粉丝