|
这些天在做TI 的SimpliciTi 的移植,原程序是在IAR 下编译的,用的是MSP430。移植中断部分不好处理。
原程序的定义:
#define __bsp_ISR_FUNCTION__(f,v) __bsp_QUOTED_PRAGMA__(vector=v) __interrupt void f(void); \
__bsp_QUOTED_PRAGMA__(vector=v) __interrupt void f(void)
#define __bsp_QUOTED_PRAGMA__(x) _Pragma(#x)
#define BSP_ISR_FUNCTION(func,vect) __bsp_ISR_FUNCTION__(func,vect)
BSP_ISR_FUNCTION( BSP_GpioPort1Isr, PORT2_VECTOR )
{
/*
* This ISR is easily replaced. The new ISR must simply
* include the following function call.
*/
MRFI_GpioIsr();
}
我用C语言编程程序也有些时间了,不明白老外为什么这样写。
请教熟悉这种方式编程的大虾,怎样改动最小移植到PICC中。
我这样试了一下
#define __bsp_ISR_FUNCTION__(f,v) __bsp_QUOTED_PRAGMA__(pesect intcode = v) __interrupt void f(void); \
编译通不过。 |
|