freemodbus移植到430 IAR工程时,usOldSR = _DINT( );这里报错。
freemodbus 官方的demo是基于Rowley Crossworks for the MSP430 和 GCC的两种编译环境的。加到IAR工程的时候,usOldSR = _DINT( );这里报错。
Error: a value of type "void" cannot be assigned to an entity of type "USHORT"
有用IAR工程编译过的朋友么?
这个要怎么解决 ?
具体函数如下:
void EnterCriticalSection( void )
{
USHORT usOldSR;
if( ucCriticalNesting == 0 )
{
#if defined (__GNUC__)
usOldSR = READ_SR;
_DINT( );
#else
usOldSR = _DINT( );
#endif
ucGIEWasEnabled = usOldSR & GIE ? TRUE : FALSE;
}
ucCriticalNesting++;
} 顶顶,沉的真快,没人指导么? usOldSR = _DINT( );这个语句改成下面两行:
_DINT( );
usOldSR =GIE;
bujie8010 发表于 2013-12-29 19:08
usOldSR = _DINT( );这个语句改成下面两行:
_DINT( );
usOldSR =GIE;
THX!
我试试。。
页:
[1]