examples: common connect component to use both interfaces at once

This commit is contained in:
David Cermak
2020-04-23 16:23:46 +02:00
parent 547210f7a5
commit 06711c7c36
6 changed files with 208 additions and 68 deletions

View File

@@ -1,18 +1,11 @@
menu "Example Connection Configuration"
choice EXAMPLE_CONNECT_INTERFACE
prompt "Connect using"
default EXAMPLE_CONNECT_WIFI
config EXAMPLE_CONNECT_WIFI
bool "connect using WiFi interface"
default y
help
Protocol examples can use Wi-Fi or Ethernet to connect to the network.
Choose which interface to use.
config EXAMPLE_CONNECT_WIFI
bool "Wi-Fi"
config EXAMPLE_CONNECT_ETHERNET
bool "Ethernet"
endchoice
Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
Choose this option to connect with WiFi
if EXAMPLE_CONNECT_WIFI
config EXAMPLE_WIFI_SSID
@@ -29,6 +22,13 @@ menu "Example Connection Configuration"
Can be left blank if the network has no security set.
endif
config EXAMPLE_CONNECT_ETHERNET
bool "connect using Ethernet interface"
default n
help
Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
Choose this option to connect with Ethernet
if EXAMPLE_CONNECT_ETHERNET
choice EXAMPLE_USE_ETHERNET
prompt "Ethernet Type"