修改源文件中的断言指令

避免编译报错!
This commit is contained in:
shauew 2018-09-05 17:19:59 +08:00 committed by GitHub
parent 6abe7e4ebd
commit eda579a156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -160,7 +160,7 @@ eMBMasterRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLengt
eMBErrorCode eStatus = MB_ENOERR; eMBErrorCode eStatus = MB_ENOERR;
ENTER_CRITICAL_SECTION( ); ENTER_CRITICAL_SECTION( );
assert_param( usMasterRcvBufferPos < MB_SER_PDU_SIZE_MAX ); RT_ASSERT( usMasterRcvBufferPos < MB_SER_PDU_SIZE_MAX );
/* Length and CRC check */ /* Length and CRC check */
if( ( usMasterRcvBufferPos >= MB_SER_PDU_SIZE_MIN ) if( ( usMasterRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
@ -235,7 +235,7 @@ xMBMasterRTUReceiveFSM( void )
BOOL xTaskNeedSwitch = FALSE; BOOL xTaskNeedSwitch = FALSE;
UCHAR ucByte; UCHAR ucByte;
assert_param(( eSndState == STATE_M_TX_IDLE ) || ( eSndState == STATE_M_TX_XFWR )); RT_ASSERT(( eSndState == STATE_M_TX_IDLE ) || ( eSndState == STATE_M_TX_XFWR ));
/* Always read the character. */ /* Always read the character. */
( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte ); ( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte );
@ -301,7 +301,7 @@ xMBMasterRTUTransmitFSM( void )
{ {
BOOL xNeedPoll = FALSE; BOOL xNeedPoll = FALSE;
assert_param( eRcvState == STATE_M_RX_IDLE ); RT_ASSERT( eRcvState == STATE_M_RX_IDLE );
switch ( eSndState ) switch ( eSndState )
{ {
@ -370,7 +370,7 @@ xMBMasterRTUTimerExpired(void)
/* Function called in an illegal state. */ /* Function called in an illegal state. */
default: default:
assert_param( RT_ASSERT(
( eRcvState == STATE_M_RX_INIT ) || ( eRcvState == STATE_M_RX_RCV ) || ( eRcvState == STATE_M_RX_INIT ) || ( eRcvState == STATE_M_RX_RCV ) ||
( eRcvState == STATE_M_RX_ERROR ) || ( eRcvState == STATE_M_RX_IDLE )); ( eRcvState == STATE_M_RX_ERROR ) || ( eRcvState == STATE_M_RX_IDLE ));
break; break;
@ -390,7 +390,7 @@ xMBMasterRTUTimerExpired(void)
break; break;
/* Function called in an illegal state. */ /* Function called in an illegal state. */
default: default:
assert_param( RT_ASSERT(
( eSndState == STATE_M_TX_XFWR ) || ( eSndState == STATE_M_TX_IDLE )); ( eSndState == STATE_M_TX_XFWR ) || ( eSndState == STATE_M_TX_IDLE ));
break; break;
} }