kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/modbus_fix_compiler_err_when_tcp_is_disabled' into 'master'
Bugfix/modbus fix compiler err when tcp is disabled Closes IDFGH-5019 and IDFGH-5376 See merge request espressif/esp-idf!13010pull/7441/head
commit
a20df743f1
|
@ -33,6 +33,8 @@
|
|||
#include "mbc_tcp_master.h" // for tcp master create function and types
|
||||
#include "port_tcp_master.h" // for tcp master port defines and types
|
||||
|
||||
#if MB_MASTER_TCP_ENABLED
|
||||
|
||||
/*-----------------------Master mode use these variables----------------------*/
|
||||
|
||||
// The response time is average processing time + data transmission
|
||||
|
@ -716,3 +718,5 @@ esp_err_t mbc_tcp_master_create(void** handler)
|
|||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#endif //#if MB_MASTER_TCP_ENABLED
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
#include "mbframe.h"
|
||||
#include "port_tcp_master.h"
|
||||
|
||||
#if MB_MASTER_TCP_ENABLED
|
||||
|
||||
/* ----------------------- Defines -----------------------------------------*/
|
||||
#define MB_TCP_CONNECTION_TIMEOUT_MS ( 20 ) // Connection timeout in mS
|
||||
#define MB_TCP_RECONNECT_TIMEOUT ( 5000000 ) // Connection timeout in uS
|
||||
|
@ -945,3 +947,5 @@ xMBMasterTCPTimerExpired(void)
|
|||
|
||||
return xNeedPoll;
|
||||
}
|
||||
|
||||
#endif //#if MB_MASTER_TCP_ENABLED
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "mbc_tcp_slave.h" // for tcp slave mb controller defines
|
||||
#include "port_tcp_slave.h" // for tcp slave port defines
|
||||
|
||||
#if MB_TCP_ENABLED
|
||||
|
||||
// Shared pointer to interface structure
|
||||
static mb_slave_interface_t* mbs_interface_ptr = NULL;
|
||||
|
||||
|
@ -221,3 +223,5 @@ esp_err_t mbc_tcp_slave_create(void** handler)
|
|||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#endif //#if MB_TCP_ENABLED
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#include "port_tcp_slave.h"
|
||||
#include "esp_modbus_common.h" // for common types for network options
|
||||
|
||||
#if MB_TCP_ENABLED
|
||||
|
||||
/* ----------------------- Defines -----------------------------------------*/
|
||||
#define MB_TCP_DISCONNECT_TIMEOUT ( CONFIG_FMB_TCP_CONNECTION_TOUT_SEC * 1000000 ) // disconnect timeout in uS
|
||||
#define MB_TCP_RESP_TIMEOUT_MS ( MB_MASTER_TIMEOUT_MS_RESPOND - 2 ) // slave response time limit
|
||||
|
@ -728,3 +730,5 @@ xMBTCPPortSendResponse( UCHAR * pucMBTCPFrame, USHORT usTCPLength )
|
|||
}
|
||||
return bFrameSent;
|
||||
}
|
||||
|
||||
#endif //#if MB_TCP_ENABLED
|
||||
|
|
Ładowanie…
Reference in New Issue