Examples: common source for GPIO range in Kconfigs defined

This commit is contained in:
Ondrej Kosta 2022-04-20 11:02:26 +02:00
parent af1f342ee8
commit 1a20b10fd3
26 changed files with 226 additions and 180 deletions

View File

@ -0,0 +1,19 @@
# Examples Environmental Capabilities
Examples environmental related capabilities files are describing the attributes which may be considered common among example projects.
It may include but it is not limited to the following:
- SoC features like maximum/minimum values, available resources, etc. which are not captured in associated ``soc_caps.h`` and there is some reason they cannot be added to ``soc_caps.h``. For example, feature definition is not generic enough and is more related to examples use case or it is just some kind of approximation which is good enough for examples but not for SoC drivers.
- Various system configuration.
- Espressif's official development boards features.
## How to use
- Update the **Environmental Capabilities ``Kcofig``** with capabilities you consider could be shared among other example projects.
- Use ``orsource`` statement in **your example project ``Kconfig``** to include the Environmental Capabilities as shown below.
```
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
```

View File

@ -0,0 +1,15 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 39
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default 33

View File

@ -0,0 +1,15 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 19
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

View File

@ -0,0 +1,16 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 19
# GPIOs 20/21 are always used by UART in examples
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

View File

@ -0,0 +1,15 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 25
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

View File

@ -0,0 +1,15 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 46
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default 45

View File

@ -0,0 +1,15 @@
config ENV_GPIO_RANGE_MIN
int
default 0
config ENV_GPIO_RANGE_MAX
int
default 48
config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

View File

@ -1,15 +1,6 @@
menu "Example Connection Configuration"
config EXAMPLE_GPIO_RANGE_MIN
int
default 0
config EXAMPLE_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_CONNECT_WIFI
bool "connect using WiFi interface"
@ -204,14 +195,14 @@ menu "Example Connection Configuration"
config EXAMPLE_ETH_MDC_GPIO
int "SMI MDC GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23
help
Set the GPIO number used by SMI MDC.
config EXAMPLE_ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18
help
Set the GPIO number used by SMI MDIO.
@ -227,28 +218,28 @@ menu "Example Connection Configuration"
config EXAMPLE_ETH_SPI_SCLK_GPIO
int "SPI SCLK GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14
help
Set the GPIO number used by SPI SCLK.
config EXAMPLE_ETH_SPI_MOSI_GPIO
int "SPI MOSI GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13
help
Set the GPIO number used by SPI MOSI.
config EXAMPLE_ETH_SPI_MISO_GPIO
int "SPI MISO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12
help
Set the GPIO number used by SPI MISO.
config EXAMPLE_ETH_SPI_CS_GPIO
int "SPI CS GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15
help
Set the GPIO number used by SPI CS.
@ -262,7 +253,7 @@ menu "Example Connection Configuration"
config EXAMPLE_ETH_SPI_INT_GPIO
int "Interrupt GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4
help
Set the GPIO number used by the SPI Ethernet module interrupt line.
@ -270,7 +261,7 @@ menu "Example Connection Configuration"
config EXAMPLE_ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default 5
help
Set the GPIO number used to reset PHY chip.

View File

@ -17,6 +17,14 @@ See the [README.md](../README.md) file in the upper level [examples](../) direct
| GPIO26 | RX1 | EMAC_RXD1 |
| GPIO27 | CRS_DV | EMAC_RX_DRV |
* One of the following GPIO pins can be used as RMII REF_CLK input/output:
| GPIO | Function | Notes |
| ------ | -------------------- | ------------ |
| GPIO0 | EMAC_TX_CLK/CLK_OUT1 | input/output |
| GPIO16 | EMAC_CLK_OUT | output |
| GPIO17 | EMAC_CLK_180 | output |
* SMI (Serial Management Interface) wiring is not fixed. You may need to changed it according to your board schematic. By default they're connected as follows:
| GPIO | SMI Signal | Notes |
@ -39,7 +47,12 @@ See the [README.md](../README.md) file in the upper level [examples](../) direct
| GPIO4 | Interrupt |
| NC | Reset |
Please consult Espressif Technical reference manual along with datasheet for specific ESP Module you use when assigning any other pins, especially when choosing from system configuration menu for the ethernet examples, some pins cannot be used (they may already be utilized for different purpose like SPI Flash/RAM, etc.).
---
**Warning:**
Please consult Espressif Technical reference manual along with datasheet for specific ESP Module you use when assigning any other pins, especially when choosing from system configuration menu for the ethernet examples, some pins cannot be used (they may already be utilized for different purpose like SPI Flash/RAM, some pins might be inputs only, etc.).
---
## Common Configurations

View File

@ -1,15 +1,6 @@
menu "Example Configuration"
config EXAMPLE_GPIO_RANGE_MIN
int
default 0
config EXAMPLE_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_USE_INTERNAL_ETHERNET
depends on IDF_TARGET_ESP32
@ -68,21 +59,21 @@ menu "Example Configuration"
config EXAMPLE_ETH_MDC_GPIO
int "SMI MDC GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23
help
Set the GPIO number used by SMI MDC.
config EXAMPLE_ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18
help
Set the GPIO number used by SMI MDIO.
config EXAMPLE_ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default 5
help
Set the GPIO number used to reset PHY chip.
@ -146,7 +137,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_SCLK_GPIO
int "SPI SCLK GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6 if IDF_TARGET_ESP32C3
@ -155,7 +146,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MOSI_GPIO
int "SPI MOSI GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13 if IDF_TARGET_ESP32
default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 7 if IDF_TARGET_ESP32C3
@ -164,7 +155,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MISO_GPIO
int "SPI MISO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32C3
@ -181,7 +172,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_CS0_GPIO
int "SPI CS0 GPIO number for SPI Ethernet module #1"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -190,7 +181,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_CS1_GPIO
depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
int "SPI CS1 GPIO number for SPI Ethernet module #2"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 32 if IDF_TARGET_ESP32
default 7 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 8 if IDF_TARGET_ESP32C3
@ -199,7 +190,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_INT0_GPIO
int "Interrupt GPIO number SPI Ethernet module #1"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
Set the GPIO number used by the first SPI Ethernet module interrupt line.
@ -207,7 +198,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_INT1_GPIO
depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
int "Interrupt GPIO number SPI Ethernet module #2"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 33 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -215,7 +206,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_PHY_RST0_GPIO
int "PHY Reset GPIO number of SPI Ethernet Module #1"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default -1
help
Set the GPIO number used to reset PHY chip on the first SPI Ethernet module.
@ -224,7 +215,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_PHY_RST1_GPIO
depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
int "PHY Reset GPIO number of SPI Ethernet Module #2"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default -1
help
Set the GPIO number used to reset PHY chip on the second SPI Ethernet module.

View File

@ -1,15 +1,6 @@
menu "Example Configuration"
config EXAMPLE_GPIO_RANGE_MIN
int
default 0
config EXAMPLE_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_ENC28J60_SPI_HOST
int "SPI Host Number"
@ -20,7 +11,7 @@ menu "Example Configuration"
config EXAMPLE_ENC28J60_SCLK_GPIO
int "SPI SCLK GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6 if IDF_TARGET_ESP32C3
@ -29,7 +20,7 @@ menu "Example Configuration"
config EXAMPLE_ENC28J60_MOSI_GPIO
int "SPI MOSI GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13 if IDF_TARGET_ESP32
default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 7 if IDF_TARGET_ESP32C3
@ -38,7 +29,7 @@ menu "Example Configuration"
config EXAMPLE_ENC28J60_MISO_GPIO
int "SPI MISO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32C3
@ -47,7 +38,7 @@ menu "Example Configuration"
config EXAMPLE_ENC28J60_CS_GPIO
int "SPI CS GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -62,7 +53,7 @@ menu "Example Configuration"
config EXAMPLE_ENC28J60_INT_GPIO
int "Interrupt GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
Set the GPIO number used by ENC28J60 interrupt.

View File

@ -1,15 +1,6 @@
menu "Example Configuration"
config EXAMPLE_GPIO_RANGE_MIN
int
default 0
config EXAMPLE_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_USE_SPI_ETHERNET
bool
@ -103,14 +94,14 @@ menu "Example Configuration"
config EXAMPLE_ETH_MDC_GPIO
int "SMI MDC GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23
help
Set the GPIO number used by SMI MDC.
config EXAMPLE_ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18
help
Set the GPIO number used by SMI MDIO.
@ -126,7 +117,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_SCLK_GPIO
int "SPI SCLK GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6 if IDF_TARGET_ESP32C3
@ -135,7 +126,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MOSI_GPIO
int "SPI MOSI GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13 if IDF_TARGET_ESP32
default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 7 if IDF_TARGET_ESP32C3
@ -144,7 +135,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MISO_GPIO
int "SPI MISO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32C3
@ -153,7 +144,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_CS_GPIO
int "SPI CS GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -169,7 +160,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_INT_GPIO
int "Interrupt GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
Set the GPIO number used by the SPI Ethernet module interrupt line.
@ -177,7 +168,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default 5
help
Set the GPIO number used to reset PHY chip.

View File

@ -1,15 +1,6 @@
menu "Example Configuration"
config EXAMPLE_GPIO_RANGE_MIN
int
default 0
config EXAMPLE_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_STORE_HISTORY
bool "Store command history in flash"
@ -119,14 +110,14 @@ menu "Example Configuration"
config EXAMPLE_ETH_MDC_GPIO
int "SMI MDC GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23
help
Set the GPIO number used by SMI MDC.
config EXAMPLE_ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18
help
Set the GPIO number used by SMI MDIO.
@ -142,7 +133,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_SCLK_GPIO
int "SPI SCLK GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6 if IDF_TARGET_ESP32C3
@ -151,7 +142,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MOSI_GPIO
int "SPI MOSI GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13 if IDF_TARGET_ESP32
default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 7 if IDF_TARGET_ESP32C3
@ -160,7 +151,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_MISO_GPIO
int "SPI MISO GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32C3
@ -169,7 +160,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_CS_GPIO
int "SPI CS GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -186,7 +177,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_SPI_INT_GPIO
int "Interrupt GPIO number"
range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
Set the GPIO number used by the SPI Ethernet module interrupt line.
@ -194,7 +185,7 @@ menu "Example Configuration"
config EXAMPLE_ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
range -1 EXAMPLE_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default 5
help
Set the GPIO number used to reset PHY chip.

View File

@ -1,5 +1,7 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
choice BLINK_LED
prompt "Blink LED type"
default BLINK_LED_GPIO if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C2
@ -15,7 +17,7 @@ menu "Example Configuration"
config BLINK_GPIO
int "Blink GPIO number"
range 0 48
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2 || IDF_TARGET_ESP32C2
default 18 if IDF_TARGET_ESP32S2
default 48 if IDF_TARGET_ESP32S3

View File

@ -1,15 +1,6 @@
menu "Example Configuration"
config SNIFFER_GPIO_RANGE_MIN
int
default 0
config SNIFFER_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config SNIFFER_STORE_HISTORY
bool "Store command history into flash"
@ -192,14 +183,14 @@ menu "Example Configuration"
config SNIFFER_ETH_MDC_GPIO
int "SMI MDC GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23
help
Set the GPIO number used by SMI MDC.
config SNIFFER_ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18
help
Set the GPIO number used by SMI MDIO.
@ -215,7 +206,7 @@ menu "Example Configuration"
config SNIFFER_ETH_SPI_SCLK_GPIO
int "SPI SCLK GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6 if IDF_TARGET_ESP32C3
@ -224,7 +215,7 @@ menu "Example Configuration"
config SNIFFER_ETH_SPI_MOSI_GPIO
int "SPI MOSI GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13 if IDF_TARGET_ESP32
default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 7 if IDF_TARGET_ESP32C3
@ -233,7 +224,7 @@ menu "Example Configuration"
config SNIFFER_ETH_SPI_MISO_GPIO
int "SPI MISO GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 12 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32C3
@ -242,7 +233,7 @@ menu "Example Configuration"
config SNIFFER_ETH_SPI_CS_GPIO
int "SPI CS GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
@ -258,7 +249,7 @@ menu "Example Configuration"
config SNIFFER_ETH_SPI_INT_GPIO
int "Interrupt GPIO number"
range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
help
Set the GPIO number used by the SPI Ethernet module interrupt line.
@ -267,7 +258,7 @@ menu "Example Configuration"
if !SNIFFER_NO_ETHERNET
config SNIFFER_ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
range -1 SNIFFER_GPIO_RANGE_MAX
range -1 ENV_GPIO_OUT_RANGE_MAX
default 5
help
Set the GPIO number used to reset PHY chip.

View File

@ -1,7 +1,10 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config GPIO_OUTPUT_0
int "GPIO output pin 0"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
default 8 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32H2
help
@ -9,6 +12,7 @@ menu "Example Configuration"
config GPIO_OUTPUT_1
int "GPIO output pin 1"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 19 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
default 9 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32H2
help
@ -16,12 +20,14 @@ menu "Example Configuration"
config GPIO_INPUT_0
int "GPIO input pin 0"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4
help
GPIO pin number to be used as GPIO_INPUT_IO_0.
config GPIO_INPUT_1
int "GPIO input pin 1"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 5
help
GPIO pin number to be used as GPIO_INPUT_IO_1.

View File

@ -1,7 +1,10 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
@ -12,6 +15,7 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32

View File

@ -1,7 +1,10 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
@ -12,6 +15,7 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32

View File

@ -1,13 +1,10 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config NMEA_PARSER_UART_RXD
int "UART RXD pin number"
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 48 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 5
help
GPIO number for UART RX pin. See UART documentation for more information

View File

@ -1,5 +1,7 @@
menu "Echo Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_UART_PORT_NUM
int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
@ -19,12 +21,7 @@ menu "Echo Example Configuration"
config EXAMPLE_UART_RXD
int "UART RXD pin number"
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 19 if IDF_TARGET_ESP32C3
range 0 48 if IDF_TARGET_ESP32S3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 5
help
GPIO number for UART RX pin. See UART documentation for more information
@ -32,12 +29,7 @@ menu "Echo Example Configuration"
config EXAMPLE_UART_TXD
int "UART TXD pin number"
range 0 33 if IDF_TARGET_ESP32
range 0 45 if IDF_TARGET_ESP32S2
range 0 19 if IDF_TARGET_ESP32C3
range 0 48 if IDF_TARGET_ESP32S3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 4
help
GPIO number for UART TX pin. See UART documentation for more information

View File

@ -1,5 +1,7 @@
menu "Echo RS485 Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config ECHO_UART_PORT_NUM
int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
@ -19,13 +21,8 @@ menu "Echo RS485 Example Configuration"
config ECHO_UART_RXD
int "UART RXD pin number"
range 0 39 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 22 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 48 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
default 8 if !IDF_TARGET_ESP32
help
GPIO number for UART RX pin. See UART documentation for more information
@ -33,13 +30,8 @@ menu "Echo RS485 Example Configuration"
config ECHO_UART_TXD
int "UART TXD pin number"
range 0 33 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23 if IDF_TARGET_ESP32
range 0 45 if IDF_TARGET_ESP32S2
range 0 48 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
default 9 if !IDF_TARGET_ESP32
help
GPIO number for UART TX pin. See UART documentation for more information
@ -47,13 +39,8 @@ menu "Echo RS485 Example Configuration"
config ECHO_UART_RTS
int "UART RTS pin number"
range 0 33 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32
range 0 45 if IDF_TARGET_ESP32S2
range 0 48 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
range 0 18 if IDF_TARGET_ESP32C2
range 0 25 if IDF_TARGET_ESP32H2
default 10 if !IDF_TARGET_ESP32
help
GPIO number for UART RTS pin. This pin is connected to

View File

@ -1,11 +1,6 @@
menu "Example Configuration"
config MDNS_GPIO_RANGE_MAX
int
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config MDNS_HOSTNAME
string "mDNS Hostname"
@ -43,7 +38,7 @@ menu "Example Configuration"
config MDNS_BUTTON_GPIO
int "Button GPIO to trigger querries"
range 0 MDNS_GPIO_RANGE_MAX
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 0
help
Set the GPIO number used as mDNS test button

View File

@ -1,5 +1,7 @@
menu "Modbus Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config MB_UART_PORT_NUM
int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
@ -18,11 +20,8 @@ menu "Modbus Example Configuration"
config MB_UART_RXD
int "UART RXD pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 22 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART RX pin. See UART documentation for more information
@ -30,11 +29,8 @@ menu "Modbus Example Configuration"
config MB_UART_TXD
int "UART TXD pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART TX pin. See UART documentation for more information
@ -42,11 +38,8 @@ menu "Modbus Example Configuration"
config MB_UART_RTS
int "UART RTS pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART RTS pin. This pin is connected to

View File

@ -1,5 +1,7 @@
menu "Modbus Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config MB_UART_PORT_NUM
int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
@ -18,11 +20,8 @@ menu "Modbus Example Configuration"
config MB_UART_RXD
int "UART RXD pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 22 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART RX pin. See UART documentation for more information
@ -30,11 +29,8 @@ menu "Modbus Example Configuration"
config MB_UART_TXD
int "UART TXD pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART TX pin. See UART documentation for more information
@ -42,11 +38,8 @@ menu "Modbus Example Configuration"
config MB_UART_RTS
int "UART RTS pin number"
range 0 34 if IDF_TARGET_ESP32
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 47 if IDF_TARGET_ESP32S3
range 0 19 if IDF_TARGET_ESP32C3
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
help
GPIO number for UART RTS pin. This pin is connected to

View File

@ -1,8 +1,10 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config BLINK_GPIO
int "Blink GPIO number"
range 0 48
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2
default 18 if IDF_TARGET_ESP32S2
default 48 if IDF_TARGET_ESP32S3

View File

@ -1,5 +1,7 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config EXAMPLE_FIRMWARE_UPG_URL
string "Firmware Upgrade URL"
default "https://192.168.2.106:8070/hello_world.bin"
@ -24,7 +26,7 @@ menu "Example Configuration"
config EXAMPLE_GPIO_DIAGNOSTIC
int "Number of the GPIO input for diagnostic"
range 0 39
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 4
help
Used to demonstrate how a rollback works.