Skip to content

Commit

Permalink
fix(modem): Use env-caps of targets for GPIO ranges in examples
Browse files Browse the repository at this point in the history
Closes #558
  • Loading branch information
david-cermak committed Nov 20, 2024
1 parent e35d7f0 commit 3817ec3
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 23 deletions.
17 changes: 12 additions & 5 deletions components/esp_modem/examples/modem_console/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

menu "Example Configuration"

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

choice EXAMPLE_SERIAL_CONFIG
prompt "Type of serial connection to the modem"
default EXAMPLE_SERIAL_CONFIG_UART
Expand Down Expand Up @@ -108,28 +110,32 @@ menu "Example Configuration"
config EXAMPLE_MODEM_UART_TX_PIN
int "TXD Pin Number"
default 25
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config EXAMPLE_MODEM_UART_RX_PIN
int "RXD Pin Number"
default 26
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

config EXAMPLE_MODEM_UART_RTS_PIN
int "RTS Pin Number"
default 27
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RTS.

config EXAMPLE_MODEM_UART_CTS_PIN
int "CTS Pin Number"
default 23
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART CTS.

Expand Down Expand Up @@ -179,7 +185,8 @@ menu "Example Configuration"
config EXAMPLE_MODEM_PWRKEY_PIN
int "PWRKEY Pin Number"
default 18
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number connected to modem's power key pin.
endmenu
14 changes: 10 additions & 4 deletions components/esp_modem/examples/modem_psm/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

menu "Example Configuration"

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

choice EXAMPLE_MODEM_DEVICE
prompt "Choose supported modem device (DCE)"
default EXAMPLE_MODEM_DEVICE_SIM7080
Expand All @@ -20,14 +22,16 @@ menu "Example Configuration"
config EXAMPLE_MODEM_UART_TX_PIN
int "TXD Pin Number"
default 4
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config EXAMPLE_MODEM_UART_RX_PIN
int "RXD Pin Number"
default 5
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

Expand Down Expand Up @@ -70,14 +74,16 @@ menu "Example Configuration"
config EXAMPLE_MODEM_PWRKEY_PIN
int "PWRKEY Pin Number"
default 18
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number connected to modem's power key pin.

config EXAMPLE_MODEM_STATUS_PIN
int "STATUS Pin Number"
default 19
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number connected to modem's status pin.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu "Example Configuration"

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

config EXAMPLE_CUSTOM_TCP_TRANSPORT
bool "Custom TCP transport"
help
Expand Down Expand Up @@ -30,28 +32,32 @@ menu "Example Configuration"
config EXAMPLE_MODEM_UART_TX_PIN
int "TXD Pin Number"
default 25
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config EXAMPLE_MODEM_UART_RX_PIN
int "RXD Pin Number"
default 26
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

config EXAMPLE_MODEM_UART_RTS_PIN
int "RTS Pin Number"
default 27
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RTS.

config EXAMPLE_MODEM_UART_CTS_PIN
int "CTS Pin Number"
default 23
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART CTS.

Expand Down
14 changes: 10 additions & 4 deletions components/esp_modem/examples/pppos_client/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu "Example Configuration"

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

choice EXAMPLE_SERIAL_CONFIG
prompt "Type of serial connection to the modem"
default EXAMPLE_SERIAL_CONFIG_UART
Expand Down Expand Up @@ -100,28 +102,32 @@ menu "Example Configuration"
config EXAMPLE_MODEM_UART_TX_PIN
int "TXD Pin Number"
default 25
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config EXAMPLE_MODEM_UART_RX_PIN
int "RXD Pin Number"
default 26
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

config EXAMPLE_MODEM_UART_RTS_PIN
int "RTS Pin Number"
default 27
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RTS.

config EXAMPLE_MODEM_UART_CTS_PIN
int "CTS Pin Number"
default 23
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART CTS.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu "Example Configuration"

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

choice EXAMPLE_MODEM_DEVICE
prompt "Choose supported modem device (DCE)"
default EXAMPLE_MODEM_DEVICE_BG96
Expand Down Expand Up @@ -69,28 +71,32 @@ menu "Example Configuration"
config EXAMPLE_MODEM_UART_TX_PIN
int "TXD Pin Number"
default 25
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config EXAMPLE_MODEM_UART_RX_PIN
int "RXD Pin Number"
default 26
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

config EXAMPLE_MODEM_UART_RTS_PIN
int "RTS Pin Number"
default 27
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RTS.

config EXAMPLE_MODEM_UART_CTS_PIN
int "CTS Pin Number"
default 23
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART CTS.
endmenu
Expand Down
6 changes: 4 additions & 2 deletions components/esp_modem/test/target/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ menu "Test App Configuration"
config TEST_APP_UART_TX_PIN
int "TXD Pin Number"
default 6
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART TX.

config TEST_APP_UART_RX_PIN
int "RXD Pin Number"
default 7
range 0 31
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX

help
Pin number of UART RX.

Expand Down

0 comments on commit 3817ec3

Please sign in to comment.