Merge branch 'bugfix/fix_serial_slave_delay_before_send' into 'master'

fix modbus slave wait before send option

Closes IDFGH-11279

See merge request idf/esp-modbus!54
This commit is contained in:
Alex Lisitsyn
2023-12-22 17:38:19 +08:00
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);
}