[AVR单片机] GCC编译警告求助(Timer0匹配中断),谢谢!

[复制链接]
1904|2
 楼主| cooperate 发表于 2008-3-17 11:55 | 显示全部楼层 |阅读模式
../Cpu.c:60: warning: return type defaults to `int'
../Cpu.c: In function `SIGNAL':
../Cpu.c:75: warning: control reaches end of non-void function



//以下为中断函数代码
SIGNAL (TIM0_COMPA_vect)    //Timer0定时60us中断
{
    uchar sreg = SREG;
    //系统定时时钟相关
    if(system_counter < 252) system_counter++;
    else
    {
        system_counter = 0;
        SETBIT(system_status,SYSTEM_CLOCK);
    }    
    SREG = sreg;
}
 楼主| cooperate 发表于 2008-3-17 11:57 | 显示全部楼层

急,请各位支招,谢谢!

 楼主| cooperate 发表于 2008-3-17 14:28 | 显示全部楼层

解决了

忘了加:<avr/interrupt.h>   汗
您需要登录后才可以回帖 登录 | 注册

本版积分规则

32

主题

230

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部