Fixed MS/TP that was not working in ports/win32 (#694)
This commit is contained in:
committed by
GitHub
parent
e984a19885
commit
fd2f33b522
@@ -203,7 +203,7 @@ static void dlmstp_master_fsm_task(void *pArg)
|
||||
}
|
||||
if (dwMilliseconds)
|
||||
WaitForSingleObject(Received_Frame_Flag, dwMilliseconds);
|
||||
MSTP_Master_Node_FSM(&MSTP_Port);
|
||||
while (MSTP_Master_Node_FSM(&MSTP_Port));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@ static void RS485_Configure_Status(void)
|
||||
/* configure the COM port timeout values */
|
||||
ctNew.ReadIntervalTimeout = MAXDWORD;
|
||||
ctNew.ReadTotalTimeoutMultiplier = MAXDWORD;
|
||||
ctNew.ReadTotalTimeoutConstant = 1000;
|
||||
ctNew.ReadTotalTimeoutConstant = 1;
|
||||
ctNew.WriteTotalTimeoutMultiplier = 0;
|
||||
ctNew.WriteTotalTimeoutConstant = 0;
|
||||
if (!SetCommTimeouts(RS485_Handle, &ctNew)) {
|
||||
|
||||
@@ -1672,7 +1672,7 @@ void MSTP_Init(struct mstp_port_struct_t *mstp_port)
|
||||
if ((mstp_port->Tframe_abort < 6) || (mstp_port->Tframe_abort > 100)) {
|
||||
mstp_port->Tframe_abort = DEFAULT_Tframe_abort;
|
||||
}
|
||||
if (mstp_port->Treply_delay > 250) {
|
||||
if ((mstp_port->Treply_delay == 0) || mstp_port->Treply_delay > 250) {
|
||||
mstp_port->Treply_delay = DEFAULT_Treply_delay;
|
||||
}
|
||||
if ((mstp_port->Treply_timeout < 20) ||
|
||||
|
||||
Reference in New Issue
Block a user