Removed forever loop on MS/TP receive for fast processors since the incoming character wait is significantly slower than the processor speed.
This commit is contained in:
@@ -1202,15 +1202,7 @@ uint16_t dlmstp_receive(
|
|||||||
/* only do receive state machine while we don't have a frame */
|
/* only do receive state machine while we don't have a frame */
|
||||||
if ((MSTP_Flag.ReceivedValidFrame == false) &&
|
if ((MSTP_Flag.ReceivedValidFrame == false) &&
|
||||||
(MSTP_Flag.ReceivedInvalidFrame == false)) {
|
(MSTP_Flag.ReceivedInvalidFrame == false)) {
|
||||||
for (;;) {
|
MSTP_Receive_Frame_FSM();
|
||||||
MSTP_Receive_Frame_FSM();
|
|
||||||
if (MSTP_Flag.ReceivedValidFrame || MSTP_Flag.ReceivedInvalidFrame)
|
|
||||||
break;
|
|
||||||
/* if we are not idle, then we are
|
|
||||||
receiving a frame or timing out */
|
|
||||||
if (Receive_State == MSTP_RECEIVE_STATE_IDLE)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* only do master state machine while rx is idle */
|
/* only do master state machine while rx is idle */
|
||||||
if (Receive_State == MSTP_RECEIVE_STATE_IDLE) {
|
if (Receive_State == MSTP_RECEIVE_STATE_IDLE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user