【问题标题】:error: expected declaration or statement at end of input atmel studio错误:输入 atmel studio 末尾的预期声明或语句
【发布时间】:2016-05-07 10:51:34
【问题描述】:

我是嵌入式系统的新手,我正在使用“atmel Studio7”,所以我打开了 xmega128a1 的 ASF 向导 T_C 驱动程序,并将其修改为仅将计时器 TCC0 设置为计数 50 毫秒并每 50 毫秒抛出一个溢出标志我评论旁边其他计时器, 我试图编译,但我有一个错误,我无法纠正错误是:“预期的声明或输入结束时的声明”。 位于这段代码中:

    void tc_set_ccd_interrupt_callback(volatile void *tc, tc_callback_t callback)
    {

       #ifdef TCC0
          if ((uintptr_t) tc == (uintptr_t) & TCC0) 
           {
             tc_tcc0_ccd_callback = callback;
           }
         else
       #endif
    }

任何人有想法或建议。

【问题讨论】:

    标签: avr-gcc atmelstudio


    【解决方案1】:

    删除 else 字。它期望在它之后有一个新的语句,而你没有

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-11
      • 1970-01-01
      • 2013-08-18
      • 2020-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多