1、【优化】主机从机串口接收数据逻辑,在T3.5到了之后,迅速关闭串口接收,避免在极端条件下可能导致接收数据区数据被覆盖的问题。感谢网友@zhangshixing

的反馈。

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink 2014-07-17 16:42:45 +08:00
parent 45ca69e9c1
commit c3325ad15e
2 changed files with 4 additions and 2 deletions

View File

@ -330,9 +330,10 @@ xMBRTUTimerT35Expired( void )
xNeedPoll = xMBPortEventPost( EV_READY );
break;
/* A frame was received and t35 expired. Notify the listener that
/* A frame was received and t35 expired. Close serial receive and notify the listener that
* a new frame was received. */
case STATE_RX_RCV:
vMBPortSerialEnable( FALSE, FALSE );
xNeedPoll = xMBPortEventPost( EV_FRAME_RECEIVED );
break;

View File

@ -356,9 +356,10 @@ xMBMasterRTUTimerExpired(void)
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_READY);
break;
/* A frame was received and t35 expired. Notify the listener that
/* A frame was received and t35 expired. Close serial receive and notify the listener that
* a new frame was received. */
case STATE_M_RX_RCV:
vMBMasterPortSerialEnable( FALSE, FALSE );
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_FRAME_RECEIVED);
break;