初学者提问,谢谢大侠们回答#pragma interrupt什么意思?

[复制链接]
 楼主| dongyipeng77 发表于 2011-10-13 15:20 | 显示全部楼层 |阅读模式
#pragma interrupt timer_ra(vect=22)
void timer_ra(void)
{
  LED1 = !LED1;
  ir_traic = 0;
}
这段程序中vect=22 什么意思啊? 还有#pragma interrupt 怎么用呢?
ayb_ice 发表于 2011-10-13 15:32 | 显示全部楼层
表示timer_ra函数是个中断函数,中量向量号是22

评分

参与人数 1威望 +1 收起 理由
dongyipeng77 + 1

查看全部评分

 楼主| dongyipeng77 发表于 2011-10-13 15:36 | 显示全部楼层
2# ayb_ice
啊,这样啊,谢谢,这个论坛好人真多啊!
ayb_ice 发表于 2011-10-13 15:54 | 显示全部楼层
猜都猜出来了
hhhxj 发表于 2019-10-31 09:14 | 显示全部楼层
/* declare routine as an interrupt so compiler ends routine with REIT instead of RTS, also
declare vector number so the compiler can automatically generate vector table */
#pragma Interrupt adc_irq
void adc_irq(void);
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

5

帖子

1

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