Merge pull request #1775 from shauew/patch-3

修改源文件中的断言指令
This commit is contained in:
Bernard Xiong 2018-09-05 17:48:09 +08:00 committed by GitHub
commit 67dde16e97
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;
ENTER_CRITICAL_SECTION( );
assert_param( usMasterRcvBufferPos < MB_SER_PDU_SIZE_MAX );
RT_ASSERT( usMasterRcvBufferPos < MB_SER_PDU_SIZE_MAX );
/* Length and CRC check */
if( ( usMasterRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
@ -235,7 +235,7 @@ xMBMasterRTUReceiveFSM( void )
BOOL xTaskNeedSwitch = FALSE;
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. */
( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte );
@ -301,7 +301,7 @@ xMBMasterRTUTransmitFSM( void )
{
BOOL xNeedPoll = FALSE;
assert_param( eRcvState == STATE_M_RX_IDLE );
RT_ASSERT( eRcvState == STATE_M_RX_IDLE );
switch ( eSndState )
{
@ -370,7 +370,7 @@ xMBMasterRTUTimerExpired(void)
/* Function called in an illegal state. */
default:
assert_param(
RT_ASSERT(
( eRcvState == STATE_M_RX_INIT ) || ( eRcvState == STATE_M_RX_RCV ) ||
( eRcvState == STATE_M_RX_ERROR ) || ( eRcvState == STATE_M_RX_IDLE ));
break;
@ -390,7 +390,7 @@ xMBMasterRTUTimerExpired(void)
break;
/* Function called in an illegal state. */
default:
assert_param(
RT_ASSERT(
( eSndState == STATE_M_TX_XFWR ) || ( eSndState == STATE_M_TX_IDLE ));
break;
}