ソースを参照

Fix the problem of compilation error when PKG_MODBUS_SLAVE_TCP is closed.

guozhanxin 4 年 前
コミット
d5a66b790f
1 ファイル変更2 行追加0 行削除
  1. 2 0
      port/porttcp.c

+ 2 - 0
port/porttcp.c

@@ -21,6 +21,7 @@
 
 #include "port.h"
 
+#ifdef PKG_MODBUS_SLAVE_TCP
 /* ----------------------- Modbus includes ----------------------------------*/
 #include "mb.h"
 #include "mbport.h"
@@ -110,3 +111,4 @@ xMBTCPPortSendResponse(const UCHAR *pucMBTCPFrame, USHORT usTCPLength)
     }
     return bFrameSent;
 }
+#endif