File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ menu "Modbus configuration"
104104 help
105105 This option defines the number of data bits per ASCII character.
106106
107+ config FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
108+ int "Wait before send for ASCII communication mode (ms)"
109+ default 0
110+ range 0 1000
111+ depends on FMB_COMM_MODE_ASCII_EN
112+ help
113+ This option defines timeout before slave sends the response in ASCII communication mode.
114+ This allows to work with slow masters. Zero means delay before send is disabled.
115+
107116 config FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS
108117 int "Response timeout for ASCII communication mode (ms)"
109118 default 1000
Original file line number Diff line number Diff line change @@ -121,8 +121,10 @@ PR_BEGIN_EXTERN_C
121121 * transmitting the frame. If the master is to slow with enabling its
122122 * receiver then he will not receive the response correctly.
123123 */
124- #ifndef MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
124+ #ifndef CONFIG_FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
125125#define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ( 0 )
126+ #else
127+ #define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ( CONFIG_FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS )
126128#endif
127129
128130/*! \brief Maximum number of Modbus functions codes the protocol stack
Original file line number Diff line number Diff line change @@ -125,3 +125,8 @@ void vMBPortTimerClose(void)
125125 }
126126#endif
127127}
128+
129+ void vMBPortTimersDelay (USHORT usTimeOutMS )
130+ {
131+ vTaskDelay (usTimeOutMS / portTICK_PERIOD_MS );
132+ }
You can’t perform that action at this time.
0 commit comments