fix modbus slave wait before send option

This commit is contained in:
Alex Lisitsyn
2023-12-22 17:38:18 +08:00
parent f0e78b6d27
commit e12c7ff02c
3 changed files with 17 additions and 1 deletions
+3 -1
View File
@@ -121,8 +121,10 @@ PR_BEGIN_EXTERN_C
* transmitting the frame. If the master is to slow with enabling its
* receiver then he will not receive the response correctly.
*/
#ifndef MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
#ifndef CONFIG_FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
#define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ( 0 )
#else
#define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ( CONFIG_FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS )
#endif
/*! \brief Maximum number of Modbus functions codes the protocol stack
+5
View File
@@ -125,3 +125,8 @@ void vMBPortTimerClose(void)
}
#endif
}
void vMBPortTimersDelay(USHORT usTimeOutMS)
{
vTaskDelay(usTimeOutMS / portTICK_PERIOD_MS);
}