共2条
1/1 1 跳转至页
【求助】用C语言怎样调用定时器中断?
问
我按照书上说的,用了这样一行指令:
interrupt [TIMERA0_VECTOR] void Timer_A(void)
可是他却说不对:
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a ";"
我添加过:#include "MSP430x15x.h" 答 1: 引用: 答 2: 按照你的方法试过。
又有警告:Warning[Pe609]: this kind of pragma may not be used here
不管它有关系么? 答 3: 警告针对的语句是:#pragma vector=TIMERA0_VECTOR 答 4: 换个版本的编译器试试。 答 5: 我们已经调出来了,谢谢
把这两句连写就可以:
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
interrupt [TIMERA0_VECTOR] void Timer_A(void)
可是他却说不对:
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a ";"
我添加过:#include "MSP430x15x.h" 答 1: 引用: 答 2: 按照你的方法试过。
又有警告:Warning[Pe609]: this kind of pragma may not be used here
不管它有关系么? 答 3: 警告针对的语句是:#pragma vector=TIMERA0_VECTOR 答 4: 换个版本的编译器试试。 答 5: 我们已经调出来了,谢谢
把这两句连写就可以:
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
共2条
1/1 1 跳转至页
回复
我要赚赏金打赏帖 |
|
|---|---|
| 基于MCP23S17的输入输出功能模块控制被打赏¥20元 | |
| 【S32K3XX】SPD 软件包使用Link文件修改被打赏¥22元 | |
| Switch-Case局部变量定义问题被打赏¥23元 | |
| 基于米尔TIAM62L开发板的串口通信及应用被打赏¥20元 | |
| PCF8574功能模块及其使用被打赏¥20元 | |
| 传感器LSM6DSO及LIS3MDL的功能检测被打赏¥18元 | |
| LPS25HB气压传感器及其检测被打赏¥18元 | |
| HTS221温湿度传感器及其检测被打赏¥18元 | |
| 【S32K3XX】HSE FW 版本更新被打赏¥21元 | |
| 基于ArduinoUNO开发板的AT24C02读写测试被打赏¥16元 | |
我要赚赏金
