瀏覽代碼

[Modbus] Add KConfig for Modbus.

armink 8 年之前
父節點
當前提交
c8ae11c428
共有 2 個文件被更改,包括 19 次插入0 次删除
  1. 2 0
      components/net/KConfig
  2. 17 0
      components/net/freemodbus/KConfig

+ 2 - 0
components/net/KConfig

@@ -122,4 +122,6 @@ config RT_USING_LWIP
 
 endmenu
 
+source "$RTT_DIR/components/net/freemodbus/KConfig"
+
 endmenu

+ 17 - 0
components/net/freemodbus/KConfig

@@ -0,0 +1,17 @@
+menu "Modbus master and slave stack"
+
+config RT_USING_MODBUS
+	bool "Enable Modbus stack"
+	default n
+
+	if RT_USING_MODBUS
+		config RT_MODBUS_MASTER_RTU
+			bool "RTU master mode"
+			default n
+
+		config RT_MODBUS_SLAVE_RTU
+			bool "RTU slave mode"
+			default n
+	endif
+
+endmenu