Fix MSTP skip data state to result in not-for-us (#165)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-04-23 13:44:20 -05:00
committed by GitHub
parent a7bc145c43
commit 297a11665b
+2 -2
View File
@@ -520,14 +520,14 @@ void MSTP_Receive_Frame_FSM(volatile struct mstp_port_struct_t *mstp_port)
mstp_port->DataRegister;
}
mstp_port->Index++;
mstp_port->receive_state = MSTP_RECEIVE_STATE_DATA;
/* SKIP_DATA or DATA - no change in state */
} else if (mstp_port->Index == mstp_port->DataLength) {
/* CRC1 */
mstp_port->DataCRC = CRC_Calc_Data(
mstp_port->DataRegister, mstp_port->DataCRC);
mstp_port->DataCRCActualMSB = mstp_port->DataRegister;
mstp_port->Index++;
mstp_port->receive_state = MSTP_RECEIVE_STATE_DATA;
/* SKIP_DATA or DATA - no change in state */
} else if (mstp_port->Index == (mstp_port->DataLength + 1)) {
/* CRC2 */
mstp_port->DataCRC = CRC_Calc_Data(