1、【优化】主机从机串口接收数据逻辑,在T3.5到了之后,迅速关闭串口接收,避免在极端条件下可能导致接收数据区数据被覆盖的问题。感谢网友@zhangshixing
的反馈。 Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
45ca69e9c1
commit
c3325ad15e
|
@ -330,9 +330,10 @@ xMBRTUTimerT35Expired( void )
|
||||||
xNeedPoll = xMBPortEventPost( EV_READY );
|
xNeedPoll = xMBPortEventPost( EV_READY );
|
||||||
break;
|
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. */
|
* a new frame was received. */
|
||||||
case STATE_RX_RCV:
|
case STATE_RX_RCV:
|
||||||
|
vMBPortSerialEnable( FALSE, FALSE );
|
||||||
xNeedPoll = xMBPortEventPost( EV_FRAME_RECEIVED );
|
xNeedPoll = xMBPortEventPost( EV_FRAME_RECEIVED );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -356,9 +356,10 @@ xMBMasterRTUTimerExpired(void)
|
||||||
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_READY);
|
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_READY);
|
||||||
break;
|
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. */
|
* a new frame was received. */
|
||||||
case STATE_M_RX_RCV:
|
case STATE_M_RX_RCV:
|
||||||
|
vMBMasterPortSerialEnable( FALSE, FALSE );
|
||||||
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_FRAME_RECEIVED);
|
xNeedPoll = xMBMasterPortEventPost(EV_MASTER_FRAME_RECEIVED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue