This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的香榭丽舍
我向我们的客户提出这一问题。
在 6.9.15编译器文档的 INTERRUPT Pragma (https://www.ti.com/lit/ug/spru514w/spru514w.pdf?ts=1630324430532&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FC2000-CGT)中、我想澄清用法。
1) 1)对于中断 C28x ISR 和 CLA 任务、
如果使用了#pragma INTERRUPT、是否有中断很重要?
也就是说、a) b) c)是否相同?
a)中断 void Cla1Task1()
B)
#pragma 中断(Cla1Task1)
中断空 Cla1Task1()
C)
#pragma 中断(Cla1Task1)
空 Cla1Task1()
2)同样、对于 CLA 背景、是否低于相同值?
A)
#pragma INTERRUPT (Cla1Task8_background、"background");
中断空 Cla1Task8_background()
B)
#pragma INTERRUPT (Cla1Task8_background、"background");
void Cla1Task8_background()
我尝试构建上述两个版本、没有发现任何不同、但我仍想再次确认。
3) 3)在123页显示的示例中 、#pragma 中断的末尾有一个";"。 是否使用了";"是否重要? 我看不到其他#pragma 用法的";"。
#pragma INTERRUPT (task_name、"background");
void task_name (void){...}
4)如果我定义
#pragma INTERRUPT (Cla1Task8_background、"background");
中断 空 Cla1Task8_background()
在.h 文件中、我只需要使用 extern 而不使用#pragma 语句、对吗?
extern 中断 void Cla1Task8_background();
黄维恩
您好、Wayne、
1) 1) 2)您的观察结果正确。 所有这些都是将函数定义为 ISR 的不同方法。
3) 3)分号似乎是拼写错误、让我在编译器组中循环以确保正确
4) 4)正确、无需在.h 文件中添加 pragma
谢谢、
Ashwini
否
谢谢、此致、
乔治