今天用401R外部中断例程看到这样的代码
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) #elif defined(__GNUC__) void __attribute__ ((interrupt(PORT1_VECTOR))) Port_1 (void) #else #error Compiler not supported! #endif
大概就是如果定义了
TI_COMPILER_VERSION
或者
IAR_SYSTEMS_ICC 就可以使用外部中断之类的意思
如果都没有定义就跳出 错误提醒:
#error Compiler not supported!
结果我运行的时候就跳出错误提示了
请问我是哪个文件没有添加才会有这种问题吗? (用的KEIL)