1menu "Example Configuration"
2
3    config EXAMPLE_GPIO_RANGE_MIN
4        int
5        default 0
6
7    config EXAMPLE_GPIO_RANGE_MAX
8        int
9        default 33 if IDF_TARGET_ESP32
10        default 46 if IDF_TARGET_ESP32S2
11        default 19 if IDF_TARGET_ESP32C3
12        default 48 if IDF_TARGET_ESP32S3
13
14    config EXAMPLE_STORE_HISTORY
15        bool "Store command history in flash"
16        default y
17        help
18            Linenoise line editing library provides functions to save and load
19            command history. If this option is enabled, initalizes a FAT filesystem
20            and uses it to store command history.
21
22    config EXAMPLE_USE_SPI_ETHERNET
23        bool
24
25    choice EXAMPLE_ETHERNET_TYPE
26        prompt "Ethernet Type"
27        default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
28        default EXAMPLE_USE_W5500
29        help
30            Select which kind of Ethernet will be used in the example.
31
32        config EXAMPLE_USE_INTERNAL_ETHERNET
33            depends on IDF_TARGET_ESP32
34            select ETH_USE_ESP32_EMAC
35            bool "Internal EMAC"
36            help
37                Select internal Ethernet MAC controller.
38
39        config EXAMPLE_USE_DM9051
40            bool "DM9051 Module"
41            select EXAMPLE_USE_SPI_ETHERNET
42            select ETH_USE_SPI_ETHERNET
43            select ETH_SPI_ETHERNET_DM9051
44            help
45                Select external SPI-Ethernet module (DM9051).
46
47        config EXAMPLE_USE_W5500
48            bool "W5500 Module"
49            select EXAMPLE_USE_SPI_ETHERNET
50            select ETH_USE_SPI_ETHERNET
51            select ETH_SPI_ETHERNET_W5500
52            help
53                Select external SPI-Ethernet module (W5500).
54
55        config EXAMPLE_USE_KSZ8851SNL
56            bool "KSZ8851SNL Module"
57            select EXAMPLE_USE_SPI_ETHERNET
58            select ETH_USE_SPI_ETHERNET
59            select ETH_SPI_ETHERNET_KSZ8851SNL
60            help
61                Select external SPI-Ethernet module (KSZ8851SNL).
62
63        config EXAMPLE_USE_ENC28J60
64            bool "ENC28J60 Module"
65            select EXAMPLE_USE_SPI_ETHERNET
66            select ETH_USE_SPI_ETHERNET
67            select ETH_SPI_ETHERNET_ENC28J60
68            help
69                Select external SPI-Ethernet module (ENC28J60).
70    endchoice # EXAMPLE_ETHERNET_TYPE
71
72    if EXAMPLE_USE_INTERNAL_ETHERNET
73        choice EXAMPLE_ETH_PHY_MODEL
74            prompt "Ethernet PHY Device"
75            default EXAMPLE_ETH_PHY_IP101
76            help
77                Select the Ethernet PHY device to use in the example.
78
79            config EXAMPLE_ETH_PHY_IP101
80                bool "IP101"
81                help
82                    IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
83                    Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
84
85            config EXAMPLE_ETH_PHY_RTL8201
86                bool "RTL8201/SR8201"
87                help
88                    RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
89                    Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
90
91            config EXAMPLE_ETH_PHY_LAN87XX
92                bool "LAN87xx"
93                help
94                    Below chips are supported:
95                    LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
96                        flexPWR® Technology.
97                    LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
98                    LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
99                        with HP Auto-MDIX and flexPWR® Technology.
100                    LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
101                        flexPWR® Technology.
102                    Goto https://www.microchip.com for more information about them.
103
104            config EXAMPLE_ETH_PHY_DP83848
105                bool "DP83848"
106                help
107                    DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
108                    Goto http://www.ti.com/product/DP83848J for more information about it.
109
110            config EXAMPLE_ETH_PHY_KSZ8041
111                bool "KSZ8041"
112                help
113                    The KSZ8041 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
114                    Goto https://www.microchip.com/wwwproducts/en/KSZ8041 for more information about it.
115
116            config EXAMPLE_ETH_PHY_KSZ8081
117                bool "KSZ8081"
118                help
119                    The KSZ8081 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
120                    Goto https://www.microchip.com/wwwproducts/en/KSZ8081 for more information about it.
121        endchoice # EXAMPLE_ETH_PHY_MODEL
122
123        config EXAMPLE_ETH_MDC_GPIO
124            int "SMI MDC GPIO number"
125            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
126            default 23
127            help
128                Set the GPIO number used by SMI MDC.
129
130        config EXAMPLE_ETH_MDIO_GPIO
131            int "SMI MDIO GPIO number"
132            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
133            default 18
134            help
135                Set the GPIO number used by SMI MDIO.
136    endif # EXAMPLE_USE_INTERNAL_ETHERNET
137
138    if EXAMPLE_USE_SPI_ETHERNET
139        config EXAMPLE_ETH_SPI_HOST
140            int "SPI Host Number"
141            range 0 2
142            default 1
143            help
144                Set the SPI host used to communicate with the SPI Ethernet Controller.
145
146        config EXAMPLE_ETH_SPI_SCLK_GPIO
147            int "SPI SCLK GPIO number"
148            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
149            default 14 if IDF_TARGET_ESP32
150            default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
151            default 6 if IDF_TARGET_ESP32C3
152            help
153                Set the GPIO number used by SPI SCLK.
154
155        config EXAMPLE_ETH_SPI_MOSI_GPIO
156            int "SPI MOSI GPIO number"
157            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
158            default 13 if IDF_TARGET_ESP32
159            default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
160            default 7 if IDF_TARGET_ESP32C3
161            help
162                Set the GPIO number used by SPI MOSI.
163
164        config EXAMPLE_ETH_SPI_MISO_GPIO
165            int "SPI MISO GPIO number"
166            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
167            default 12 if IDF_TARGET_ESP32
168            default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
169            default 2 if IDF_TARGET_ESP32C3
170            help
171                Set the GPIO number used by SPI MISO.
172
173        config EXAMPLE_ETH_SPI_CS_GPIO
174            int "SPI CS GPIO number"
175            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
176            default 15 if IDF_TARGET_ESP32
177            default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
178            help
179                Set the GPIO number used by SPI CS.
180
181        config EXAMPLE_ETH_SPI_CLOCK_MHZ
182            int "SPI clock speed (MHz)"
183            range 5 80
184            default 8 if EXAMPLE_USE_ENC28J60
185            default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
186            default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
187            help
188                Set the clock speed (MHz) of SPI interface.
189
190        config EXAMPLE_ETH_SPI_INT_GPIO
191            int "Interrupt GPIO number"
192            range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
193            default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
194            help
195                Set the GPIO number used by the SPI Ethernet module interrupt line.
196    endif # EXAMPLE_USE_SPI_ETHERNET
197
198    config EXAMPLE_ETH_PHY_RST_GPIO
199        int "PHY Reset GPIO number"
200        range -1 EXAMPLE_GPIO_RANGE_MAX
201        default 5
202        help
203            Set the GPIO number used to reset PHY chip.
204            Set to -1 to disable PHY chip hardware reset.
205
206    config EXAMPLE_ETH_PHY_ADDR
207        int "PHY Address"
208        range 0 31
209        default 1
210        help
211            Set PHY address according your board schematic.
212
213    if EXAMPLE_USE_ENC28J60
214        choice EXAMPLE_ENC28J60_DUPLEX_MODE
215            prompt "Duplex Mode"
216            default EXAMPLE_ENC28J60_DUPLEX_HALF
217            help
218                Select ENC28J60 Duplex operation mode.
219
220            config EXAMPLE_ENC28J60_DUPLEX_FULL
221                bool "Full Duplex"
222                help
223                    Set ENC28J60 to Full Duplex mode. Do not forget to manually set the remote node (switch, router
224                    or Ethernet controller) to full-duplex operation mode too.
225
226            config EXAMPLE_ENC28J60_DUPLEX_HALF
227                bool "Half Duplex"
228                help
229                    Set ENC28J60 to Half Duplex mode.
230        endchoice # EXAMPLE_ENC28J60_DUPLEX_MODE
231    endif # ETH_SPI_ETHERNET_ENC28J60
232endmenu
233