mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freemodbus: fix compiler err when tcp is disabled (backport v4.3)
This commit is contained in:
parent
605c1b16f0
commit
de7f5305a7
@ -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
|
||||
@ -714,3 +716,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
|
||||
@ -944,3 +946,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;
|
||||
|
||||
@ -220,3 +222,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
|
||||
@ -708,3 +710,5 @@ xMBTCPPortSendResponse( UCHAR * pucMBTCPFrame, USHORT usTCPLength )
|
||||
}
|
||||
return bFrameSent;
|
||||
}
|
||||
|
||||
#endif //#if MB_TCP_ENABLED
|
||||
|
Loading…
x
Reference in New Issue
Block a user