File tree 3 files changed +17
-1
lines changed
3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ menu "Modbus configuration"
104
104
help
105
105
This option defines the number of data bits per ASCII character.
106
106
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
+
107
116
config FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS
108
117
int "Response timeout for ASCII communication mode (ms)"
109
118
default 1000
Original file line number Diff line number Diff line change @@ -121,8 +121,10 @@ PR_BEGIN_EXTERN_C
121
121
* transmitting the frame. If the master is to slow with enabling its
122
122
* receiver then he will not receive the response correctly.
123
123
*/
124
- #ifndef MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
124
+ #ifndef CONFIG_FMB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
125
125
#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 )
126
128
#endif
127
129
128
130
/*! \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)
125
125
}
126
126
#endif
127
127
}
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