parent
6abe7e4ebd
commit
eda579a156
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue